comments and updates to notebook image.

This commit is contained in:
mathematicalmichael 2019-02-18 13:52:07 -07:00
parent 178bcc2534
commit 7db31543dd

View File

@ -16,28 +16,35 @@ RUN apt-get update && \
gfortran \ gfortran \
gcc gcc
# finish off with MPI dependencies # finish off with MPI dependencies (only required if not installing fenics)
RUN sudo apt-get install mpich libmpich-dev -y && rm -rf /var/lib/apt/lists/* #RUN sudo apt-get install mpich libmpich-dev -y && rm -rf /var/lib/apt/lists/*
RUN conda update --all && conda install fenics
USER jovyan USER jovyan
RUN conda update --all
RUN conda install fenics
RUN python3 -m pip install --no-cache jupyterhub==$JUPYTERHUB_VERSION nbresuse RUN python3 -m pip install --no-cache jupyterhub==$JUPYTERHUB_VERSION nbresuse && \
jupyter labextension install jupyterlab-topbar-extension && \
jupyter labextension install jupyterlab-system-monitor
# If you do not need parallelism, delete the following.
RUN python3 -m pip install ipyparallel mpi4py RUN python3 -m pip install ipyparallel mpi4py
RUN ipython profile create --parallel --profile=mpi RUN ipython profile create --parallel --profile=mpi
RUN ipython profile create --parallel --profile=default
RUN echo "c.IPClusterEngines.engine_launcher_class = 'MPIEngineSetLauncher'" >> /home/jovyan/.ipython/profile_mpi/ipcluster_config.py RUN echo "c.IPClusterEngines.engine_launcher_class = 'MPIEngineSetLauncher'" >> /home/jovyan/.ipython/profile_mpi/ipcluster_config.py
# Python 2 environment
USER root USER root
RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 ipython ipykernel kernda numpy pandas matplotlib ipywidgets yaml ipyparallel mpi4py RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 ipython ipykernel kernda numpy pandas matplotlib ipywidgets yaml ipyparallel mpi4py
RUN /opt/conda/envs/python2/bin/ipython profile create --parallel --profile=mpi RUN /opt/conda/envs/python2/bin/ipython profile create --parallel --profile=mpi
# Create a global kernelspec in the image and modify it so that it properly activates # Create a global kernelspec in the image and modify it so that it properly activates
# the python2 conda environment. # the python2 conda environment.
RUN $CONDA_DIR/envs/python2/bin/python -m ipykernel install && \ RUN $CONDA_DIR/envs/python2/bin/python -m ipykernel install && \
$CONDA_DIR/envs/python2/bin/kernda -o -y /usr/local/share/jupyter/kernels/python2/kernel.json $CONDA_DIR/envs/python2/bin/kernda -o -y /usr/local/share/jupyter/kernels/python2/kernel.json
# R environment
USER root USER root
RUN apt-get update && \ RUN apt-get update && \
@ -68,5 +75,7 @@ ENV PATH="${PATH}:/usr/lib/rstudio-server/bin"
ENV LD_LIBRARY_PATH="/usr/lib/R/lib:/lib:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server:/opt/conda/lib/R/lib" ENV LD_LIBRARY_PATH="/usr/lib/R/lib:/lib:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server:/opt/conda/lib/R/lib"
#ENV LD_LIBRARY_PATH="/usr/lib/R/lib:/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server:/opt/conda/lib/R/lib" #ENV LD_LIBRARY_PATH="/usr/lib/R/lib:/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server:/opt/conda/lib/R/lib"
# USER SETTINGS
USER jovyan USER jovyan
RUN echo "export EDITOR=/usr/bin/vim" >> /home/jovyan/.bashrc RUN echo "export EDITOR=/usr/bin/vim" >> /home/jovyan/.bashrc