jupyterhub-deploy-docker
jupyterhub-deploy-docker copied to clipboard
Use Lab as default route
I would like to use jupyterlab as the default application. Although, it is properly installed and reachable (by manually navigating to the /lab endpoint), /tree (jupyterhub) is still the default route. I found some old posts (e.g., #26 ) and there is even an example config, but it seems to be outdated.
How could one set the default route to jupyter lab?
Using https://github.com/jupyterhub/jupyterhub-deploy-docker/tree/master/examples/jupyterlab as a template I added
export DOCKER_SPAWN_CMD="start-singleuser.sh --SingleUserNotebookApp.default_url=/lab"
to .bashrc.
I thought one could simply set that here
https://github.com/jupyterhub/jupyterhub-deploy-docker/blob/d2bed7a1ce5e2b140e0eea6c3781bbd7154268e7/.env#L30
but apparently not. Spawner fails completely!
Maybe someone can elaborate!
This took me a bit to navigate, I have gotten this to work by adding the following lines to jupyterhub_config.py
spawn_cmd = "start-singleuser.sh --SingleUserNotebookApp.default_url=/lab --SingleUserNotebookApp.disable_user_config=True"
c.DockerSpawner.extra_create_kwargs.update({ 'command': spawn_cmd })
Using https://github.com/jupyterhub/jupyterhub-deploy-docker/tree/master/examples/jupyterlab as a template I added
export DOCKER_SPAWN_CMD="start-singleuser.sh --SingleUserNotebookApp.default_url=/lab"to
.bashrc.I thought one could simply set that here
https://github.com/jupyterhub/jupyterhub-deploy-docker/blob/d2bed7a1ce5e2b140e0eea6c3781bbd7154268e7/.env#L30
but apparently not. Spawner fails completely!
Maybe someone can elaborate!
should be fine in the .env file but needs to be captured in quotes. surprised that didn't work but @closedLoop's seemingly equivalent solution did.
another option is JUPYTER_ENABLE_LAB = True (although it's a crapshoot as to whether it's JUPYTERHUB or JUPYTER)
JupyterLab is now the default