ideonate / cdsdashboards

JupyterHub extension for ContainDS Dashboards
https://cdsdashboards.readthedocs.io/
Other
199 stars 38 forks source link

How to make the dashboard work with jupyterlab collaborative flag #101

Open yuhuishi-convect opened 2 years ago

yuhuishi-convect commented 2 years ago

Describe the bug

When deployed with jupyterhub, if I put the following line in jupyterhub config to enable the latest collaboration feature of jupyterlab

c.KubeSpawner.args = ['--collaborative']

This will append additional arg when starting the single user server.

However, CDSdashbaord will also pick up the additional arg. When the default_presentation_cmd is set as

c.VariableMixin.default_presentation_cmd = ['python3', '-m', 'jhsingle_native_proxy.main']

The command will become

python3 -m jhsingle_native_proxy.main xxxx.py --collabrative

However, since --collabrative is not compatible with the presentation command, the single user server will fail to start

To Reproduce

In jupyterhub_config.py put

c.KubeSpawner.args = ['--collaborative']
c.VariableMixin.default_presentation_cmd = ['python3', '-m', 'jhsingle_native_proxy.main']

Then start a dashboard

Screenshots

Configuration

Zero to JupyterHub on AWS EKS

xeliba commented 2 years ago

There is another way to turn on "collaborative" mode. In the docker image for your user servers you need to create a file /etc/jupyter/jupyter_server_config_extra.py. Add the line: c.LabApp.collaborative = True