Skip to content
Snippets Groups Projects
Commit 886b97e5 authored by Jan David Mol's avatar Jan David Mol
Browse files

Fix directory ownership/access for user using Jupyter

parent 0449c051
No related branches found
No related tags found
No related merge requests found
ARG VERSION=latest ARG VERSION=latest
FROM nexus.engageska-portugal.pt/ska-docker/tango-itango:${VERSION} FROM nexus.engageska-portugal.pt/ska-docker/tango-itango:${VERSION}
# UID if the user that this container will run under. This is needed to give directories
# that are needed for temporary storage the proper owner and access rights.
ARG CONTAINER_EXECUTION_UID=1000
RUN sudo pip3 install jupyter RUN sudo pip3 install jupyter
RUN sudo pip3 install ipykernel RUN sudo pip3 install ipykernel
RUN sudo pip3 install jupyter_bokeh RUN sudo pip3 install jupyter_bokeh
...@@ -13,7 +17,6 @@ RUN sudo jupyter nbextension enable jupyter_bokeh --py --sys-prefix ...@@ -13,7 +17,6 @@ RUN sudo jupyter nbextension enable jupyter_bokeh --py --sys-prefix
# Install profiles for ipython & jupyter # Install profiles for ipython & jupyter
COPY ipython-profiles /opt/ipython-profiles/ COPY ipython-profiles /opt/ipython-profiles/
RUN sudo chmod a+rw -R /opt/ipython-profiles
COPY jupyter-kernels /usr/local/share/jupyter/kernels/ COPY jupyter-kernels /usr/local/share/jupyter/kernels/
# Install patched jupyter executable # Install patched jupyter executable
...@@ -28,5 +31,6 @@ RUN sudo chmod +x /usr/bin/tini ...@@ -28,5 +31,6 @@ RUN sudo chmod +x /usr/bin/tini
# Make sure Jupyter can write to the home directory # Make sure Jupyter can write to the home directory
ENV HOME=/home/user ENV HOME=/home/user
RUN sudo mkdir -p $HOME RUN sudo mkdir -p ${HOME}
RUN sudo chmod a+rwx $HOME RUN sudo chown ${CONTAINER_EXECUTION_UID} -R ${HOME}
RUN sudo chown ${CONTAINER_EXECUTION_UID} -R /opt/ipython-profiles
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment