From 5ca00bd9b6d935b6f0083baee2bdea13b298c5bf Mon Sep 17 00:00:00 2001 From: mathematicalmichael Date: Mon, 18 Feb 2019 17:22:33 -0700 Subject: [PATCH] permissions fixed. --- singleuser/Dockerfile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/singleuser/Dockerfile b/singleuser/Dockerfile index 0e17675..2210804 100755 --- a/singleuser/Dockerfile +++ b/singleuser/Dockerfile @@ -24,10 +24,6 @@ USER jovyan RUN conda update --all 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. RUN python3 -m pip install ipyparallel mpi4py 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 # 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 +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 /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 # the python2 conda environment. 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 +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 USER root