Last active
April 5, 2020 21:26
Attempt at compiling the Ice Sheet System Model (ISSM) on docker (Python 3 interface, hopefully). Also using conda to install some packages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jupyter/minimal-notebook | |
USER root | |
RUN apt -qq update && apt install -y --no-install-recommends \ | |
git-svn \ | |
python-dev \ | |
python3-dev \ | |
&& rm -rf /var/lib/apt/lists/* | |
USER $NB_UID | |
# Use git svn to clone the ISSM svn trunk repository from revision 24493 (24 Dec 2019) | |
RUN echo 'anon' | git svn clone --username anon -r 24493 https://issm.ess.uci.edu/svn/issm/issm/trunk | |
# Install various conda dependencies | |
RUN conda install \ | |
automake \ | |
blas=*=*mkl \ | |
cmake \ | |
fortran-compiler \ | |
lapack \ | |
libtool \ | |
matplotlib \ | |
mpich-mpicxx \ | |
nose \ | |
numpy \ | |
petsc \ | |
scipy \ | |
triangle \ | |
&& conda clean --all --yes | |
# Change to interactive bash shell, so that `conda activate` works | |
SHELL ["/bin/bash", "-ic"] | |
RUN conda init --verbose | |
# Install dependencies shipped with ISSM | |
ENV ISSM_DIR ${HOME}/trunk | |
#RUN unset F90 && \ | |
# cd $ISSM_DIR/externalpackages/mpich && \ | |
# ./install-3.0-linux64.sh | |
#RUN . $ISSM_DIR/etc/environment.sh && \ | |
# cd $ISSM_DIR/externalpackages/petsc && \ | |
# ./install-3.11-linux64.sh | |
RUN . $ISSM_DIR/etc/environment.sh && \ | |
cd $ISSM_DIR/externalpackages/m1qn3 && \ | |
./install.sh | |
RUN . $ISSM_DIR/etc/environment.sh && \ | |
cd $ISSM_DIR/externalpackages/triangle && \ | |
./install-linux64.sh | |
# Compile ISSM | |
RUN cd $ISSM_DIR && \ | |
. $ISSM_DIR/etc/environment.sh && \ | |
autoreconf -ivf | |
RUN cd $ISSM_DIR && \ | |
./configure \ | |
--prefix="$ISSM_DIR" \ | |
--disable-static \ | |
--with-numthreads=8 \ | |
--with-python-dir="$CONDA_DIR" \ | |
--with-python-numpy-dir="$CONDA_DIR/lib/python3.7/site-packages/numpy" \ | |
#--with-fortran-lib="-L$CONDA_DIR/lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0 -lgfortran" \ | |
--with-mpi-include="$CONDA_DIR/lib/include" \ | |
--with-mpi-libflags="-L$CONDA_DIR/lib -lmpi -lmpicxx -lmpifort" \ | |
#--with-blas-lapack-dir="$CONDA_DIR/lib" \ | |
--with-metis-dir="$CONDA_DIR/lib" \ | |
--with-scalapack-dir="$CONDA_DIR/lib" \ | |
--with-mumps-dir="$CONDA_DIR/lib" \ | |
--with-petsc-dir="$CONDA_DIR" \ | |
--with-triangle-dir="$CONDA_DIR/include" \ | |
--with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \ | |
--with-m1qn3-dir="$ISSM_DIR/externalpackages/m1qn3/install" | |
ENV LD_LIBRARY_PATH ${CONDA_DIR}/lib | |
RUN cd $ISSM_DIR && \ | |
make --jobs=8 && \ | |
make install |
Author
weiji14
commented
Mar 19, 2020
Development of this code moved to https://github.com/weiji14/pyissm.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment