From b1451551f2768437ec852da6af5fb27e7bcb553a Mon Sep 17 00:00:00 2001 From: Simon Li Date: Sat, 13 Jul 2024 19:33:46 +0100 Subject: [PATCH] local-binder-local-hub: use jupyterhub-singleuser if AUTHENTICATOR set --- testing/local-binder-local-hub/jupyterhub_config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/local-binder-local-hub/jupyterhub_config.py b/testing/local-binder-local-hub/jupyterhub_config.py index 02fd3f0d6..a45a8e8d6 100644 --- a/testing/local-binder-local-hub/jupyterhub_config.py +++ b/testing/local-binder-local-hub/jupyterhub_config.py @@ -26,7 +26,6 @@ class LocalContainerSpawner(BinderSpawnerMixin, DockerSpawner): c.JupyterHub.spawner_class = LocalContainerSpawner c.DockerSpawner.remove = True c.DockerSpawner.allowed_images = "*" -c.LocalContainerSpawner.cmd = "jupyter-notebook" c.Application.log_level = "DEBUG" c.Spawner.debug = True @@ -34,6 +33,8 @@ class LocalContainerSpawner(BinderSpawnerMixin, DockerSpawner): auth_enabled = c.JupyterHub.authenticator_class != "null" if auth_enabled: + c.LocalContainerSpawner.auth_enabled = True + c.LocalContainerSpawner.cmd = "jupyterhub-singleuser" c.JupyterHub.load_roles = [ { "name": "user", @@ -44,6 +45,8 @@ class LocalContainerSpawner(BinderSpawnerMixin, DockerSpawner): ], } ] +else: + c.LocalContainerSpawner.cmd = "jupyter-notebook" c.JupyterHub.hub_ip = "0.0.0.0" c.JupyterHub.hub_connect_ip = hostip