From fc38957b9af313e2c7cce940c4c3314ad2c308ae Mon Sep 17 00:00:00 2001 From: DerGrumpf Date: Tue, 16 Sep 2025 10:41:51 +0200 Subject: [PATCH] Fixed: Startup building time --- jupyterhub/compose.yml | 10 ++++++++++ jupyterhub/jupyterhub_config.py | 3 +++ 2 files changed, 13 insertions(+) diff --git a/jupyterhub/compose.yml b/jupyterhub/compose.yml index 643b3af..9fdd301 100644 --- a/jupyterhub/compose.yml +++ b/jupyterhub/compose.yml @@ -15,3 +15,13 @@ services: - ../nbgrader/exchange:/srv/nbgrader/exchange - ../nbgrader/courses:/srv/nbgrader/courses + # Just the Hacky way to pull images at startup + # It just pulls the image but they wont startup + # speeds up first spawn dramatically + base: + image: jupyter/base-notebook:latest + entrypoint: ['echo hi'] + + datasciene: + image: jupyter/datasciene-notebook:latest + entrypoint: ['echo hi'] diff --git a/jupyterhub/jupyterhub_config.py b/jupyterhub/jupyterhub_config.py index d56ce2f..e9ad8a7 100644 --- a/jupyterhub/jupyterhub_config.py +++ b/jupyterhub/jupyterhub_config.py @@ -88,6 +88,9 @@ c.JupyterHub.spawner_class = DockerSpawner # Spawn Containers from this Image c.DockerSpawner.image = os.environ.get("NOTEBOOK_IMAGE", "jupyter/base-notebook:latest") +# Spawn this "version" of the Notebook +c.DockerSpawner.default_url = os.environ.get("SPAWNER_DEFAULT_URL", "/tree") + # Connect Containers to this network network_name = os.environ.get("DOCKER_NETWORK_NAME", "stack_default") # Let docker manage network communications