Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using notebook CMD to run the jupyter stack #331

Merged
merged 3 commits into from
Nov 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions stack/lab/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ FROM base

LABEL maintainer="AiiDAlab Team <aiidalab@materialscloud.org>"

# By default, Jupyter Docker image launches the JupyterLab interface.
# Here, we change it to the classic Jupyter Notebook which is used by AiiDAlab.
# In the future, we might want to switch to other options such as `nbclassic` or `retro`,
# but the `nbclassic` is not supported because of appmode.
# see: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/common.html#switching-back-to-the-classic-notebook-or-using-a-different-startup-command
ENV DOCKER_STACKS_JUPYTER_CMD=notebook

USER root
WORKDIR /opt/

Expand Down Expand Up @@ -74,9 +81,6 @@ WORKDIR "/home/${NB_USER}"

RUN mkdir -p /home/${NB_USER}/apps

# Switch to NOTEBOOK_ARGS approach (see below)
# for newer jupyter docker stack versions.
RUN echo 'c.NotebookApp.default_url="/apps/apps/home/start.ipynb"' >> /etc/jupyter/jupyter_notebook_config.py
# ENV NOTEBOOK_ARGS \
# "--NotebookApp.default_url='/apps/apps/home/start.ipynb'" \
# "--ContentsManager.allow_hidden=True"
ENV NOTEBOOK_ARGS \
"--NotebookApp.default_url='/apps/apps/home/start.ipynb'" \
"--ContentsManager.allow_hidden=True"