diff --git a/README.md b/README.md index 911be8d..7845a87 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ # CNERG Dockerfiles A set of dockerfiles to be shared among CNERG users for our mutual benefit and convenience. + +ubuntu: + -u.18.04.py.2.7: ubuntu 18.04 + python 2.7 + -u.18.04.py.3.6: ubuntu 18.04 + python 3.6 + +moab: + - u.18.04_py.2.7_moab.5.1.0: moab 5.1.0 against ubuntu 18.04 + python 2.7 + - u.18.04_py.3.6_moab.5.1.0: moab 5.1.0 against ubuntu 18.04 + python 3.6 + +dagmc: + - u.18.04_py.2.7_moab.5.1.0_dagmc.dev: dagmc develop against ubuntu 18.04 + python 2.7 + moab 5.1.0 + - u.18.04_py.3.6_moab.5.1.0_dagmc.dev: dagmc develop against ubuntu 18.04 + python 3.6 + moab 5.1.0 + +pyne: + - u.18.04_py.2.7_moab.5.1.0_dagmc.dev_pyne.dev: pyne develop against ubuntu 18.04 + python 2.7 + moab 5.1.0 + dagmc develop + - u.18.04_py.3.6_moab.5.1.0_dagmc.dev_pyne.dev: pyne develop against ubuntu 18.04 + python 3.6 + moab 5.1.0 + dagmc develop diff --git a/dagmc/u.18.04_py.2.7_moab.5.1.0_dagmc.dev.dockerfile b/dagmc/u.18.04_py.2.7_moab.5.1.0_dagmc.dev.dockerfile new file mode 100644 index 0000000..7c9b600 --- /dev/null +++ b/dagmc/u.18.04_py.2.7_moab.5.1.0_dagmc.dev.dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu.18.04_python.2.7_moab:5.1.0 + +ENV INSTALL_PATH=$HOME/opt/dagmc +RUN cd /root \\ + && git clone https://github.com/svalinn/DAGMC.git \ + && cd DAGMC \ + && git checkout develop \ + && mkdir bld \ + && cd bld \ + && cmake .. -DMOAB_DIR=$HOME/opt/moab \ + -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH \ + && make \ + && make install + +# Define default command +CMD ["/bin/bash"] diff --git a/dagmc/u.18.04_py.3.6_moab.5.1.0_dagmc.dev.dockerfile b/dagmc/u.18.04_py.3.6_moab.5.1.0_dagmc.dev.dockerfile new file mode 100644 index 0000000..d51b738 --- /dev/null +++ b/dagmc/u.18.04_py.3.6_moab.5.1.0_dagmc.dev.dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu.18.04_python.3.6_moab:5.1.0 + +ENV INSTALL_PATH=$HOME/opt/dagmc +RUN cd /root \\ + && git clone https://github.com/svalinn/DAGMC.git \ + && cd DAGMC \ + && git checkout develop \ + && mkdir bld \ + && cd bld \ + && cmake .. -DMOAB_DIR=$HOME/opt/moab \ + -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH \ + && make \ + && make install + +# Define default command +CMD ["/bin/bash"] diff --git a/moab b/moab.dockerfile similarity index 100% rename from moab rename to moab.dockerfile diff --git a/moab/u.18.04_py.2.7_moab.5.1.0.dockerfile b/moab/u.18.04_py.2.7_moab.5.1.0.dockerfile new file mode 100644 index 0000000..fb6ffed --- /dev/null +++ b/moab/u.18.04_py.2.7_moab.5.1.0.dockerfile @@ -0,0 +1,43 @@ +FROM ubuntu.18.04_py:2.7 + +# make starting directory +RUN mkdir -p $HOME/opt +RUN echo "export PATH=$HOME/.local/bin:\$PATH" >> ~/.bashrc \ + && echo "alias build_pyne='python setup.py install --user -j 3 -DMOAB_LIBRARY=\$HOME/opt/moab/lib -DMOAB_INCLUDE_DIR=\$HOME/opt/moab/include'" >> ~/.bashrc \ + && echo "alias python=python" >> ~/.bashrc \ + && echo "alias nosetests=nosetests3" >> ~/.bashrc + +RUN pip install cython --force-reinstall + +# build MOAB +RUN cd $HOME/opt \ + && mkdir moab \ + && cd moab \ + && git clone https://bitbucket.org/fathomteam/moab \ + && cd moab \ + && git checkout -b Version5.1.0 origin/Version5.1.0 \ + && cd .. \ + && mkdir build \ + && cd build \ + && ls ../moab/ \ + && cmake ../moab/ \ + -DCMAKE_INSTALL_PREFIX=$HOME/opt/moab \ + -DENABLE_HDF5=ON \ + && make -j 3 \ + && make install \ + && cmake ../moab/ \ + -DCMAKE_INSTALL_PREFIX=$HOME/opt/moab \ + -DENABLE_HDF5=ON \ + -DBUILD_SHARED_LIBS=OFF \ + && make -j 3 \ + && make install \ + && cd .. \ + && rm -rf build moab + +# put MOAB on the path +ENV LD_LIBRARY_PATH $HOME/opt/moab/lib:$LD_LIBRARY_PATH +ENV LIBRARY_PATH $HOME/opt/moab/lib:$LIBRARY_PATH +ENV PYTHONPATH=$HOME/opt/moab/lib/python2.7/site-packages/ + +# Define default command +CMD ["/bin/bash"] diff --git a/moab/u.18.04_py.3.6_moab.5.1.0.dockerfile b/moab/u.18.04_py.3.6_moab.5.1.0.dockerfile new file mode 100644 index 0000000..51242e0 --- /dev/null +++ b/moab/u.18.04_py.3.6_moab.5.1.0.dockerfile @@ -0,0 +1,41 @@ +FROM ubuntu.18.04_py:3.6 + +# make starting directory +RUN mkdir -p $HOME/opt +RUN echo "export PATH=$HOME/.local/bin:\$PATH" >> ~/.bashrc \ + && echo "alias build_pyne='python setup.py install --user -j 3 -DMOAB_LIBRARY=\$HOME/opt/moab/lib -DMOAB_INCLUDE_DIR=\$HOME/opt/moab/include'" >> ~/.bashrc \ + && echo "alias python=python" >> ~/.bashrc \ + && echo "alias nosetests=nosetests3" >> ~/.bashrc + +# build MOAB +RUN cd $HOME/opt \ + && mkdir moab \ + && cd moab \ + && git clone https://bitbucket.org/fathomteam/moab \ + && cd moab \ + && git checkout -b Version5.1.0 origin/Version5.1.0 \ + && cd .. \ + && mkdir build \ + && cd build \ + && ls ../moab/ \ + && cmake ../moab/ \ + -DCMAKE_INSTALL_PREFIX=$HOME/opt/moab \ + -DENABLE_HDF5=ON \ + && make -j 3 \ + && make install \ + && cmake ../moab/ \ + -DCMAKE_INSTALL_PREFIX=$HOME/opt/moab \ + -DENABLE_HDF5=ON \ + -DBUILD_SHARED_LIBS=OFF \ + && make -j 3 \ + && make install \ + && cd .. \ + && rm -rf build moab + +# put MOAB on the path +ENV LD_LIBRARY_PATH $HOME/opt/moab/lib:$LD_LIBRARY_PATH +ENV LIBRARY_PATH $HOME/opt/moab/lib:$LIBRARY_PATH +ENV PYTHONPATH=$HOME/opt/moab/lib/python3.6/site-packages/ + +# Define default command +CMD ["/bin/bash"] diff --git a/pyne/u.18.04_py.2.7_moab.5.1.0_dagmc.dev_pyne.dev.dockerfile b/pyne/u.18.04_py.2.7_moab.5.1.0_dagmc.dev_pyne.dev.dockerfile new file mode 100644 index 0000000..b6f1658 --- /dev/null +++ b/pyne/u.18.04_py.2.7_moab.5.1.0_dagmc.dev_pyne.dev.dockerfile @@ -0,0 +1,15 @@ +from ubuntu.18.04_python.2.7_moab.5.1.0_dagmc:dev + +# Install PyNE +RUN cd $HOME/opt \ + && git clone https://github.com/cnerg/pyne.git \ + && cd pyne \ + && git checkout pymoab_cleanup \ + && python setup.py install --user \ + --moab $HOME/opt/moab --dagmc $HOME/opt/dagmc --clean + +ENV PATH $HOME/.local/bin:$PATH +RUN cd $HOME && nuc_data_make + +# Define default command +CMD ["/bin/bash"] diff --git a/pyne/u.18.04_py.3.6_moab.5.1.0_dagmc.dev_pyne.dev.dockerfile b/pyne/u.18.04_py.3.6_moab.5.1.0_dagmc.dev_pyne.dev.dockerfile new file mode 100644 index 0000000..4083682 --- /dev/null +++ b/pyne/u.18.04_py.3.6_moab.5.1.0_dagmc.dev_pyne.dev.dockerfile @@ -0,0 +1,15 @@ +from ubuntu.18.04_python.3.6_moab.5.1.0_dagmc:dev + +# Install PyNE +RUN cd $HOME/opt \ + && git clone https://github.com/cnerg/pyne.git \ + && cd pyne \ + && git checkout pymoab_cleanup \ + && python3 setup.py install --user \ + --moab $HOME/opt/moab --dagmc $HOME/opt/dagmc --clean + +ENV PATH $HOME/.local/bin:$PATH +RUN cd $HOME && nuc_data_make + +# Define default command +CMD ["/bin/bash"] diff --git a/ubuntu.18.04_python_moab.5.1.0_dagmc.dev_pyne.dev.sh b/ubuntu.18.04_python_moab.5.1.0_dagmc.dev_pyne.dev.sh new file mode 100755 index 0000000..1ebfb6a --- /dev/null +++ b/ubuntu.18.04_python_moab.5.1.0_dagmc.dev_pyne.dev.sh @@ -0,0 +1,23 @@ +#!/bin/bash + + +py_v="3.6" +if [ ! $# -eq 1 ]; then + echo "Python version not specified!" + echo "Using default version: ${py_v}" +elif [ $1 == "3.6" ] || [ $1 == "2.7" ]; then + py_v=$1 +else + echo "2.7 and 3.6 are the only supported Python version !" + echo "Using default version: ${py_v}" +fi + +# build Ubuntu 18.04 with required python version +docker build -t ubuntu.18.04_py:${py_v} -f ubuntu/u.18.04.py.${py_v}.dockerfile . +# build moab +docker build -t ubuntu.18.04_python.${py_v}_moab:5.1.0 -f moab/u.18.04_py.${py_v}_moab.5.1.0.dockerfile . +# build dagmc +docker build -t ubuntu.18.04_python.${py_v}_moab.5.1.0_dagmc:dev -f dagmc/u.18.04_py.${py_v}_moab.5.1.0_dagmc.dev.dockerfile . +# build pyne +docker build -t ubuntu.18.04_py.${py_v}_moab.5.1.0_dagmc.dev_pyne:dev -f pyne/u.18.04_py.${py_v}_moab.5.1.0_dagmc.dev_pyne.dev.dockerfile . + diff --git a/ubuntu/u.18.04.py.2.7.dockerfile b/ubuntu/u.18.04.py.2.7.dockerfile new file mode 100644 index 0000000..addf911 --- /dev/null +++ b/ubuntu/u.18.04.py.2.7.dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:18.04 + +ENV TZ=America/Chicago +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ENV HOME /root +RUN apt-get update \ + && apt-get install -y --fix-missing \ + software-properties-common wget g++ \ + build-essential python-numpy python-scipy cython python-setuptools \ + python-nose git cmake vim emacs gfortran libblas-dev \ + liblapack-dev libhdf5-dev libhdf5-serial-dev gfortran python-tables \ + python-matplotlib python-jinja2 python-dev libpython-dev \ + autoconf libtool python-setuptools python-pip doxygen \ + && apt-get clean -y \ + && pip install sphinx \ + cloud_sptheme \ + prettytable \ + sphinxcontrib_bibtex \ + numpydoc \ + nbconvert \ + numpy + + +# Define default command +CMD ["/bin/bash"] diff --git a/ubuntu/u.18.04.py.3.6.dockerfile b/ubuntu/u.18.04.py.3.6.dockerfile new file mode 100644 index 0000000..1dfab4a --- /dev/null +++ b/ubuntu/u.18.04.py.3.6.dockerfile @@ -0,0 +1,28 @@ +FROM ubuntu:18.04 + +ENV TZ=America/Chicago +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ENV HOME /root + +RUN apt-get update \ + && apt-get install -y --fix-missing \ + software-properties-common wget g++ \ + build-essential python3-numpy python3-scipy cython python3-setuptools \ + python3-nose git cmake vim emacs gfortran libblas-dev \ + liblapack-dev libhdf5-dev libhdf5-serial-dev gfortran python3-tables \ + python3-matplotlib python3-jinja2 python3-dev libpython3-dev \ + autoconf libtool python-setuptools python3-pip doxygen \ + && apt-get clean -y \ + && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \ + && pip3 install --force-reinstall \ + sphinx \ + cloud_sptheme \ + prettytable \ + sphinxcontrib_bibtex \ + numpydoc \ + nbconvert \ + cython + +# Define default command +CMD ["/bin/bash"]