Skip to content

Commit

Permalink
permissions fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilosov committed Feb 19, 2019
1 parent f81046c commit 5ca00bd
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions singleuser/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,33 @@ 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
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
Expand Down

0 comments on commit 5ca00bd

Please sign in to comment.