mmh352 / ou-container-builder

0 stars 2 forks source link

Container build for JupyterLab & notebook v7 #51

Open psychemedia opened 2 years ago

psychemedia commented 2 years ago

It would be useful to have either a new pack, or an exension to the old pack, that lets you select:

For TM351, we might well be using JupyterLab as the default environment.

psychemedia commented 2 years ago

Jupyter Lab can be launched using jupyterhub-singleuser by setting a modified command in the jupyterhub_config.py file [docs]:

#Default:
#c.Spawner.cmd = ['jupyterhub-singleuser']
c.Spawner.cmd=["jupyter-labhub"]

The Jupyter Lab CLI start command is: jupyter lab

Currently, in ou-container-builder, the start routine is handled by generators/jupyter_notebook/start.sh

if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then
    exec jupyterhub-singleuser --ip=0.0.0.0 --port 8888 --NotebookApp.config_file=/etc/jupyter/jupyter_notebook_config.py
else
    exec jupyter notebook --NotebookApp.config_file=/etc/jupyter/jupyter_notebook_config.py
fi

The invoked JupyterHub script is https://github.com/jupyterhub/jupyterhub/blob/main/jupyterhub/singleuser/app.py which also looks to now default to JuptyerLab.

JupyterLab settings are configured differently to classic notebook settings: https://jupyterlab.readthedocs.io/en/stable/user/directories.html?labconfig-directories

I'm not sure how settings files are managed for retrolab/notebook v7.

If we keep running classic notebook, it might also be worth moving to nblassic which uses the same Jupyter Server backend as JuptyerLab and the new RetroLab/notebook v7?

psychemedia commented 2 years ago

It might make sense to have a new generator, jupyter-server, which uses jupyter server and via a parameter then allows selection of the startup environment as one of lab, notebook (which is to say retrolab/notebook v7) or classicnb. If other UIs powered by jupyter server appear, they can be added in as addtional options.

mmh352 commented 2 years ago

Since the JH project has now basically completed the transition to using jupyter server for everything, this should probably be mirrored in the generators. Possibly the best way forward is to deprecate the jupyter_notebook and web_app generators and switch to using just jupyter server everywhere with configuration options to select what should run in practice.