Skip to content

Commit

Permalink
fix: jupyterlab runtime volume permissions (#7407)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesuperzapper authored Dec 6, 2023
1 parent 16ae921 commit 603d0ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 3 additions & 5 deletions components/example-notebook-servers/jupyter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ RUN python3 -m pip install -r /tmp/requirements.txt --quiet --no-cache-dir \
# s6 - copy scripts
COPY --chown=${NB_USER}:users --chmod=755 s6/ /etc

# configure - jupyter
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements"

# s6 - 01-copy-tmp-home
USER root
RUN mkdir -p /tmp_home \
&& cp -r ${HOME} /tmp_home \
&& chown -R ${NB_USER}:users /tmp_home
USER $NB_UID

# generate jupyter config
RUN jupyter notebook --generate-config \
&& jupyter lab --generate-config \
&& jupyter labextension disable "@jupyterlab/apputils-extension:announcements"

EXPOSE 8888
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/command/with-contenv bash

# the runtime directory must be a path that is NOT a persistent volume
# as volumes often cause permission issues https://github.com/jupyter/notebook/issues/5058
export JUPYTER_RUNTIME_DIR="/tmp/jupyter_runtime"

cd "${HOME}"
exec /opt/conda/bin/jupyter lab \
--notebook-dir="${HOME}" \
Expand All @@ -9,5 +14,6 @@ exec /opt/conda/bin/jupyter lab \
--ServerApp.token="" \
--ServerApp.password="" \
--ServerApp.allow_origin="*" \
--ServerApp.base_url="${NB_PREFIX}" \
--ServerApp.authenticate_prometheus=False
--ServerApp.allow_remote_access=True \
--ServerApp.authenticate_prometheus=False \
--ServerApp.base_url="${NB_PREFIX}"

0 comments on commit 603d0ad

Please sign in to comment.