jupyterhub-deploy-docker icon indicating copy to clipboard operation
jupyterhub-deploy-docker copied to clipboard

Use Lab as default route

Open inkrement opened this issue 6 years ago • 4 comments

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?

inkrement avatar Feb 05 '19 12:02 inkrement

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!

dwinkler1 avatar Feb 22 '19 16:02 dwinkler1

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 })

closedLoop avatar Jun 17 '19 09:06 closedLoop

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.

mathematicalmichael avatar Jul 08 '20 20:07 mathematicalmichael

another option is JUPYTER_ENABLE_LAB = True (although it's a crapshoot as to whether it's JUPYTERHUB or JUPYTER)

mathematicalmichael avatar Jul 08 '20 20:07 mathematicalmichael

JupyterLab is now the default

manics avatar Dec 05 '22 00:12 manics