From ef59f4a85112663e282555ab956e8fcf9892635d Mon Sep 17 00:00:00 2001 From: Jaro Camphuijsen Date: Tue, 19 May 2020 12:00:40 +0200 Subject: [PATCH 1/3] Added support for choosing docker image from duckerhub tags at login --- jupyterhub_config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jupyterhub_config.py b/jupyterhub_config.py index fc8ea4a..3baaf05 100644 --- a/jupyterhub_config.py +++ b/jupyterhub_config.py @@ -16,8 +16,10 @@ '/mnt/data/data1/thredds': {'bind': '/home/{username}/_data', 'mode': 'ro'}, '/mnt/data/data2/cordex-fpsc': {'bind': '/home/{username}/_cordex-fpsc', 'mode': 'ro'}, } -c.DockerSpawner.image = '{{ docker_image }}' - +# c.DockerSpawner.image = '{{ docker_image }}' +c.DockerSpawner.image_whitelist = {'latest': 'eucp/notebook:latest', + 'stable': 'eucp/notebook:stable', + } # Turn off; minimize non-essential warnings & errors in the logs c.PAMAuthenticator.open_sessions = False From b6695f86cd4e35613addce187b83b8b5ff96b737 Mon Sep 17 00:00:00 2001 From: Jaro Camphuijsen Date: Tue, 19 May 2020 17:32:51 +0200 Subject: [PATCH 2/3] anticipating different image tag procedure, pin versions and remove old document with docker image tags --- conda.yml | 12 ++++++------ docker_vars.yml | 10 ---------- jupyterhub_config.py | 5 +++-- 3 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 docker_vars.yml diff --git a/conda.yml b/conda.yml index b1ca49c..5bd6dc8 100644 --- a/conda.yml +++ b/conda.yml @@ -26,12 +26,12 @@ # This may speed up conda trying to match dependencies # TODO2: install all packages at once; this may speed up resolving dependencies loop: - - jupyterhub - - notebook - - jupyterlab - - sudospawner - - dockerspawner - - numpy + - jupyterhub = 1.1.0 + - notebook = 6.0.3 + - jupyterlab = 2.1.1 + - sudospawner = 0.5.2 + - dockerspawner = 0.11.1 + - numpy = 1.18.1 - file: path: /opt/conda diff --git a/docker_vars.yml b/docker_vars.yml deleted file mode 100644 index d4edc30..0000000 --- a/docker_vars.yml +++ /dev/null @@ -1,10 +0,0 @@ -#docker_image: jupyter/datascience-notebook:7a3e968dd212 -#docker_image: evertrol/eucp-notebook:64de3f568873 -#docker_image: evertrol/eucp-notebook:53286a2e9791 -#docker_image: evertrol/eucp-notebook:40e99d7fee5b -#docker_image: evertrol/eucp-notebook:519eae90c305 -#docker_image: evertrol/eucp-notebook:2a0516105fa5 -#docker_image: evertrol/eucp-notebook:95611dde901d -#docker_image: evertrol/eucp-notebook:70f2afbd0fb0 -#docker_image: evertrol/eucp-notebook:17be1b0bac70 -docker_image: evertrol/eucp-notebook:08eb66f14951 diff --git a/jupyterhub_config.py b/jupyterhub_config.py index 3baaf05..2a458d6 100644 --- a/jupyterhub_config.py +++ b/jupyterhub_config.py @@ -17,8 +17,9 @@ '/mnt/data/data2/cordex-fpsc': {'bind': '/home/{username}/_cordex-fpsc', 'mode': 'ro'}, } # c.DockerSpawner.image = '{{ docker_image }}' -c.DockerSpawner.image_whitelist = {'latest': 'eucp/notebook:latest', - 'stable': 'eucp/notebook:stable', +c.DockerSpawner.image_whitelist = {'original': 'eucp/notebook:1.0.0', + 'latest': 'eucp/notebook:latest', + '1.0.0': 'eucp/notebook:1.0.0', } # Turn off; minimize non-essential warnings & errors in the logs From 322e2e208a2833063e15a14093a82c5286c3c1cd Mon Sep 17 00:00:00 2001 From: Jaro Camphuijsen Date: Mon, 25 May 2020 13:44:27 +0200 Subject: [PATCH 3/3] update image tags and pull all images --- docker.yml | 2 +- jupyterhub_config.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker.yml b/docker.yml index 4183530..4d38ad8 100644 --- a/docker.yml +++ b/docker.yml @@ -25,4 +25,4 @@ state: started - name: Prepull the Docker image - shell: docker pull {{ docker_image }} + shell: docker pull -a eucp/notebook diff --git a/jupyterhub_config.py b/jupyterhub_config.py index 2a458d6..18f69e4 100644 --- a/jupyterhub_config.py +++ b/jupyterhub_config.py @@ -17,9 +17,10 @@ '/mnt/data/data2/cordex-fpsc': {'bind': '/home/{username}/_cordex-fpsc', 'mode': 'ro'}, } # c.DockerSpawner.image = '{{ docker_image }}' -c.DockerSpawner.image_whitelist = {'original': 'eucp/notebook:1.0.0', +c.DockerSpawner.image_whitelist = {'original': 'eucp/notebook:06af23e0e8b9', 'latest': 'eucp/notebook:latest', - '1.0.0': 'eucp/notebook:1.0.0', + '1.1.0': 'eucp/notebook:version-1.1.0', + '1.0.0': 'eucp/notebook:version-1.0.0', } # Turn off; minimize non-essential warnings & errors in the logs