From 39f365eb144ed0b52dd879996b56769609044769 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Fri, 25 Nov 2022 22:52:35 +0100 Subject: [PATCH 1/3] Using notebook CMD to run the jupyter stack --- stack/lab/Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/stack/lab/Dockerfile b/stack/lab/Dockerfile index 306638fe..2c1ad6bb 100644 --- a/stack/lab/Dockerfile +++ b/stack/lab/Dockerfile @@ -3,6 +3,13 @@ FROM base LABEL maintainer="AiiDAlab Team " +# The lab mode is default to run jupyter server. +# Here the CMD pinned to `notebook` for running in legacy notebook backend +# In the future, we have appmode compatible with nbclassic +# we can use the server backend which is the alternative of legacy +# notebook backend. +ENV DOCKER_STACKS_JUPYTER_CMD=notebook + USER root WORKDIR /opt/ @@ -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" From e96a56ef2c90f183e193d0453ba06310f7082f37 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Mon, 28 Nov 2022 11:15:43 +0100 Subject: [PATCH 2/3] re-d --- stack/lab/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stack/lab/Dockerfile b/stack/lab/Dockerfile index 2c1ad6bb..94c8cc61 100644 --- a/stack/lab/Dockerfile +++ b/stack/lab/Dockerfile @@ -3,11 +3,11 @@ FROM base LABEL maintainer="AiiDAlab Team " -# The lab mode is default to run jupyter server. -# Here the CMD pinned to `notebook` for running in legacy notebook backend -# In the future, we have appmode compatible with nbclassic -# we can use the server backend which is the alternative of legacy -# notebook backend. +# 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 From 05c45f0e4d7967f05970903fd12df31a88becf7e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 28 Nov 2022 10:16:00 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- stack/lab/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack/lab/Dockerfile b/stack/lab/Dockerfile index 94c8cc61..f8686196 100644 --- a/stack/lab/Dockerfile +++ b/stack/lab/Dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="AiiDAlab Team " # 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`, +# 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