permissions fixed.

This commit is contained in:
mathematicalmichael 2019-02-18 17:22:33 -07:00
parent f81046c876
commit 5ca00bd9b6

View File

@ -24,10 +24,6 @@ USER jovyan
RUN conda update --all RUN conda update --all
RUN conda install fenics RUN conda install fenics
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. # 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
@ -35,15 +31,26 @@ 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 # Python 2 environment
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 scipy pyDOE
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
USER root
# 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
USER $NB_UID
# Jupyterhub and memory monitoring
RUN python3 -m pip install --no-cache jupyterhub==$JUPYTERHUB_VERSION nbresuse && \
jupyter labextension install jupyterlab-topbar-extension && \
jupyter labextension install jupyterlab-system-monitor && \
npm cache clean --force && \
rm -rf $CONDA_DIR/share/jupyter/lab/staging && \
rm -rf /home/$NB_USER/.cache/yarn && \
rm -rf /home/$NB_USER/.node-gyp && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
# R environment # R environment
USER root USER root