diff --git a/ansible/tljh.yml b/ansible/tljh.yml index 5c46e01..9592c85 100644 --- a/ansible/tljh.yml +++ b/ansible/tljh.yml @@ -46,6 +46,7 @@ # Pull the repo2docker image to build user images - name: Pull the repo2docker Docker image docker_image: - name: quay.io/jupyterhub/repo2docker - tag: main + name: "{{ repo2docker_docker_name }}" + tag: "{{ repo2docker_docker_tag }}" source: pull + force_source: yes diff --git a/ansible/vars/default.yml b/ansible/vars/default.yml index 2d992cd..eb9fa4f 100644 --- a/ansible/vars/default.yml +++ b/ansible/vars/default.yml @@ -9,4 +9,7 @@ tljh_prefix: /opt/tljh tljh_bootstrap_pip_spec: git+https://github.com/jtpio/the-littlest-jupyterhub.git@skip-install#"egg=the_littlest_jupyterhub" tljh_installer_url: https://raw.githubusercontent.com/jtpio/the-littlest-jupyterhub/skip-install/bootstrap/bootstrap.py +repo2docker_docker_name: quay.io/jupyterhub/repo2docker +repo2docker_docker_tag: 2023.06.0-41.g57d229e + ... diff --git a/docs/install/ansible.md b/docs/install/ansible.md index ce64c02..bd1bb5c 100644 --- a/docs/install/ansible.md +++ b/docs/install/ansible.md @@ -268,6 +268,21 @@ tagged as `v0.1`: tljh_plasma: git+https://github.com/plasmabio/plasma@v0.1#"egg=tljh-plasma&subdirectory=tljh-plasma" ``` +## Using a specific version of `repo2docker` + +`repo2docker` is used to build the user environments from the Git repositories. + +By default the Ansible playbooks use a pinned version of the `jupyterhub/repo2docker`, which is defined in the +`ansible/vars/default.yml` file. + +Like other Ansible variables, it is possible to use a different version of `repo2docker` by overriding the variable +via the command line: + +```bash +# use an older version of the repo2docker image +ansible-playbook tljh.yml -i hosts -u ubuntu -e "repo2docker_docker_tag=2022.10.0-232.g0ea6f7d" +``` + ## List of available playbooks The Ansible playbooks are located in the `ansible/` directory: diff --git a/tljh-plasma/tljh_plasma/__init__.py b/tljh-plasma/tljh_plasma/__init__.py index ff067bb..60f2ffc 100644 --- a/tljh-plasma/tljh_plasma/__init__.py +++ b/tljh-plasma/tljh_plasma/__init__.py @@ -123,6 +123,8 @@ def tljh_custom_jupyterhub_config(c, tljh_config_file=CONFIG_FILE): c.PlasmaSpawner.cmd = ["/srv/conda/envs/notebook/bin/jupyterhub-singleuser"] # set the default cpu and memory limits c.PlasmaSpawner.args = ["--ResourceUseDisplay.track_cpu_percent=True"] + # explicitely opt-in to enable the custom entrypoint logic + c.PlasmaSpawner.run_as_root = True # prevent PID 1 running in the Docker container to stop when child processes are killed # see https://github.com/plasmabio/plasma/issues/191 for more info diff --git a/tljh-plasma/tljh_plasma/entrypoint/entrypoint.sh b/tljh-plasma/tljh_plasma/entrypoint/entrypoint.sh index e9a66d8..0a91c1c 100755 --- a/tljh-plasma/tljh_plasma/entrypoint/entrypoint.sh +++ b/tljh-plasma/tljh_plasma/entrypoint/entrypoint.sh @@ -43,4 +43,4 @@ export JUPYTER_PATH=${IMAGE_DIR}/.local/share/jupyter cd ${IMAGE_DIR} # execute the notebook process as the given user -exec su - $NB_USER -m -c '"$0" "$@"' -- "$@" +exec su $NB_USER -m -c '"$0" "$@"' -- "$@"