|
| 1 | +FROM osx:10.15.6 |
| 2 | + |
| 3 | +ENV HOME /root |
| 4 | + |
| 5 | +RUN apt-get -y --force-yes update |
| 6 | +RUN apt-get install -y --force-yes \ |
| 7 | + software-properties-common wget |
| 8 | + |
| 9 | +# pyne specific dependencies (excluding python libraries) |
| 10 | +RUN apt-get install -y build-essential git cmake vim emacs gfortran libblas-dev \ |
| 11 | + python-pip liblapack-dev libhdf5-dev autoconf libtool |
| 12 | + |
| 13 | +# need to put libhdf5.so on LD_LIBRARY_PATH |
| 14 | +ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu |
| 15 | +ENV LIBRARY_PATH /usr/lib/x86_64-linux-gnu |
| 16 | + |
| 17 | +# upgrade pip and install python dependencies |
| 18 | +ENV PATH $HOME/.local/bin:$PATH |
| 19 | +RUN python -m pip install --user --upgrade pip |
| 20 | +RUN pip install --user numpy scipy cython nose tables matplotlib jinja2 \ |
| 21 | + setuptools future |
| 22 | + |
| 23 | +# make starting directory |
| 24 | +RUN cd $HOME \ |
| 25 | + && mkdir opt |
| 26 | + |
| 27 | +# build MOAB |
| 28 | +RUN cd $HOME/opt \ |
| 29 | + && mkdir moab \ |
| 30 | + && cd moab \ |
| 31 | + && git clone https://bitbucket.org/fathomteam/moab \ |
| 32 | + && cd moab \ |
| 33 | + && git checkout -b Version5.1.0 origin/Version5.1.0 \ |
| 34 | + && autoreconf -fi \ |
| 35 | + && cd .. \ |
| 36 | + && mkdir build \ |
| 37 | + && cd build \ |
| 38 | + && ../moab/configure --enable-shared --enable-dagmc --enable-pymoab --with-hdf5=/usr/lib/x86_64-linux-gnu/hdf5/serial --prefix=$HOME/opt/moab \ |
| 39 | + && make \ |
| 40 | + && make install \ |
| 41 | + && cd .. \ |
| 42 | + && rm -rf build moab |
| 43 | + |
| 44 | +# put MOAB on the path |
| 45 | +ENV LD_LIBRARY_PATH $HOME/opt/moab/lib:$LD_LIBRARY_PATH |
| 46 | +ENV LIBRARY_PATH $HOME/opt/moab/lib:$LIBRARY_PATH |
| 47 | + |
| 48 | +# Install PyNE |
| 49 | +RUN cd $HOME/opt \ |
| 50 | + && git clone https://github.com/pyne/pyne.git \ |
| 51 | + && cd pyne \ |
| 52 | + && TAG=$(git describe --abbrev=0 --tags) \ |
| 53 | + && git checkout tags/`echo $TAG` -b `echo $TAG` \ |
| 54 | + && python setup.py install --user -- -DMOAB_LIBRARY=$HOME/opt/moab/lib -DMOAB_INCLUDE_DIR=$HOME/opt/moab/include |
| 55 | + |
| 56 | +RUN echo "export PATH=$HOME/.local/bin:\$PATH" >> ~/.bashrc \ |
| 57 | + && echo "export LD_LIBRARY_PATH=$HOME/.local/lib:\$LD_LIBRARY_PATH" >> ~/.bashrc \ |
| 58 | + && echo "alias build_pyne='python setup.py install --user -- -DMOAB_LIBRARY=\$HOME/opt/moab/lib -DMOAB_INCLUDE_DIR=\$HOME/opt/moab/include'" >> ~/.bashrc |
| 59 | + |
| 60 | +ENV LD_LIBRARY_PATH $HOME/.local/lib:$LD_LIBRARY_PATH |
| 61 | + |
| 62 | +RUN cd $HOME/opt/pyne && ./scripts/nuc_data_make \ |
| 63 | + && cd tests \ |
| 64 | + && ./travis-run-tests.sh python2 \ |
| 65 | + && echo "PyNE build complete. PyNE can be rebuilt with the alias 'build_pyne' executed from $HOME/opt/pyne" |
0 commit comments