diff --git a/pymoab-py2-18.04 b/pymoab-py2-18.04 new file mode 100644 index 0000000..90bd494 --- /dev/null +++ b/pymoab-py2-18.04 @@ -0,0 +1,56 @@ +FROM ubuntu:18.04 + +# set timezone +ENV HOME /root +ENV TZ=America/Chicago +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ENV HOME /root + +RUN apt-get -y --force-yes update \ + && apt-get install -y --force-yes \ + software-properties-common \ + build-essential \ + git \ + cmake \ + gfortran \ + libblas-dev \ + python-pip \ + liblapack-dev \ + libhdf5-dev \ + autoconf \ + libtool + +# need to put libhdf5.so on LD_LIBRARY_PATH +ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu +ENV LIBRARY_PATH /usr/lib/x86_64-linux-gnu + +# upgrade pip and install python dependencies +ENV PATH $HOME/.local/bin:$PATH +RUN python -m pip install --upgrade pip \ + && pip install numpy scipy cython tables matplotlib setuptools future pytest + +# make starting directory +RUN cd $HOME \ + && mkdir opt + +# build MOAB +RUN cd $HOME/opt \ + && mkdir moab \ + && cd moab \ + && git clone --depth 1 -b Version5.1.0 --single-branch https://bitbucket.org/fathomteam/moab \ + && mkdir build \ + && cd build \ + && cmake ../moab -DCMAKE_C_FLAGS="-fPIC -DPIC" -DCMAKE_CXX_FLAGS="-fPIC -DPIC" -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--no-undefined" -DENABLE_MPI=OFF \ + -DENABLE_HDF5=ON -DHDF5_ROOT=/usr/lib/x86_64-linux-gnu/hdf5/serial \ + -DENABLE_NETCDF=OFF -DENABLE_METIS=OFF -DENABLE_IMESH=OFF -DENABLE_FBIGEOM=OFF \ + -DENABLE_PYMOAB=ON -DPREFIX=$HOME/opt/moab \ + && make all -j 8 \ + && cd .. \ + && rm -rf build moab + +# set environment variables +ENV PATH $HOME/opt/moab/bin/:$PATH +ENV LD_LIBRARY_PATH $HOME/opt/moab/lib:$LD_LIBRARY_PATH +ENV PYTHONPATH $HOME/opt/moab/lib/python2.7/site-packages/:$PYTHONPATH diff --git a/pymoab-py3-18.04 b/pymoab-py3-18.04 new file mode 100644 index 0000000..366eda9 --- /dev/null +++ b/pymoab-py3-18.04 @@ -0,0 +1,61 @@ +FROM ubuntu:18.04 + +# set timezone +ENV HOME /root +ENV TZ=America/Chicago +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ENV HOME /root + +RUN apt-get -y --force-yes update \ + && apt-get install -y --force-yes \ + software-properties-common \ + build-essential \ + git \ + cmake \ + gfortran \ + libblas-dev \ + python3-pip \ + liblapack-dev \ + libhdf5-dev \ + autoconf \ + libtool + +# need to put libhdf5.so on LD_LIBRARY_PATH +ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu +ENV LIBRARY_PATH /usr/lib/x86_64-linux-gnu +ENV PATH $HOME/.local/bin:$PATH + +# switch to python 3 +RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10; \ + update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10; + +# upgrade pip and install python dependencies +RUN python -m pip install --upgrade pip \ + && pip install numpy scipy cython tables matplotlib setuptools future pytest + + +# make starting directory +RUN cd $HOME \ + && mkdir opt + +# build MOAB +RUN cd $HOME/opt \ + && mkdir moab \ + && cd moab \ + && git clone --depth 1 -b Version5.1.0 --single-branch https://bitbucket.org/fathomteam/moab \ + && mkdir build \ + && cd build \ + && cmake ../moab -DCMAKE_C_FLAGS="-fPIC -DPIC" -DCMAKE_CXX_FLAGS="-fPIC -DPIC" -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--no-undefined" -DENABLE_MPI=OFF \ + -DENABLE_HDF5=ON -DHDF5_ROOT=/usr/lib/x86_64-linux-gnu/hdf5/serial \ + -DENABLE_NETCDF=OFF -DENABLE_METIS=OFF -DENABLE_IMESH=OFF -DENABLE_FBIGEOM=OFF \ + -DENABLE_PYMOAB=ON -DPREFIX=$HOME/opt/moab \ + && make all -j 8 \ + && cd .. \ + && rm -rf build moab + +# set environment variables +ENV PATH $HOME/opt/moab/bin/:$PATH +ENV LD_LIBRARY_PATH $HOME/opt/moab/lib:$LD_LIBRARY_PATH +ENV PYTHONPATH $HOME/opt/moab/lib/python3.6/site-packages/:$PYTHONPATH