@@ -24,7 +24,7 @@ class LocalNativeAuthenticator(NativeAuthenticator, LocalAuthenticator):
2424# jupyter/docker-stacks *-notebook images as the Docker run command when
2525# spawning containers. Optionally, you can override the Docker run command
2626# using the DOCKER_SPAWN_CMD environment variable.
27- SPAWN_CMD = os .environ .get ("DOCKER_SPAWN_CMD" , "start-singleuser.sh " )
27+ SPAWN_CMD = os .environ .get ("DOCKER_SPAWN_CMD" , "start-singleuser.py " )
2828
2929# Connect containers to this Docker network
3030# IMPORTANT, THIS MUST MATCH THE NETWORK DECLARED in "services.yml", by default: "cogstack-net"
@@ -65,7 +65,7 @@ class LocalNativeAuthenticator(NativeAuthenticator, LocalAuthenticator):
6565os .environ ["http_proxy" ] = ""
6666os .environ ["https_proxy" ] = ""
6767
68- c : Config = get_config () #noqa
68+ c : Config = get_config ()
6969
7070# Spawn containers from this image
7171# Either use the CoGstack one from the repo which is huge and contains all the stuff needed or,
@@ -207,8 +207,12 @@ def per_user_limit(role):
207207
208208# set DockerSpawner args
209209c .DockerSpawner .extra_create_kwargs = {"user" : "root" }
210- c .DockerSpawner .cmd = [SPAWN_CMD ] if isinstance (SPAWN_CMD , str ) else SPAWN_CMD
210+ c .DockerSpawner .args = [
211+ "--allow-root" ,
212+ "--NotebookApp.token=''" ,
213+ ]
211214
215+ c .DockerSpawner .cmd = [SPAWN_CMD ] if isinstance (SPAWN_CMD , str ) else SPAWN_CMD
212216
213217c .DockerSpawner .notebook_dir = NOTEBOOK_DIR
214218
@@ -277,20 +281,20 @@ def per_user_limit(role):
277281c .FirstUseAuthenticator .create_users = True
278282c .JupyterHub .authenticator_class = "firstuseauthenticator.FirstUseAuthenticator"
279283
280-
281-
282284# User containers will access hub by container name on the Docker network
283285c .JupyterHub .ip = "0.0.0.0"
284286c .JupyterHub .hub_ip = "0.0.0.0"
285287c .JupyterHub .hub_connect_ip = HUB_CONTAINER_IP_OR_NAME
286288
287-
288289jupyter_hub_port = int (os .environ .get ("JUPYTERHUB_INTERNAL_PORT" , 8888 ))
289290jupyter_hub_proxy_api_port = int (os .environ .get ("JUPYTERHUB_INTERNAL_PROXY_API_PORT" , 8887 ))
290291jupyter_hub_ssl_port = int (os .environ .get ("JUPYTERHUB_SSL_PORT" , 443 ))
291292jupyter_hub_proxy_url = str (os .environ .get ("JUPYTERHUB_PROXY_API_URL" , "http://127.0.0.1:" ))
292293
293294c .ConfigurableHTTPProxy .api_url = jupyter_hub_proxy_url + str (jupyter_hub_proxy_api_port )
295+ # c.JupyterHub.hub_connect_url = f"https://{HUB_CONTAINER_IP_OR_NAME}:{jupyter_hub_ssl_port}"
296+ # c.DockerSpawner.hub_connect_url = c.JupyterHub.hub_connect_url
297+
294298# ideally a private network address
295299# c.JupyterHub.proxy_api_ip = "10.0.1.4"
296300# c.JupyterHub.proxy_api_port = jupyter_hub_proxy_api_port
0 commit comments