From 21ee498b73666709d6b4ae9257b9d78281c4b89c Mon Sep 17 00:00:00 2001 From: George Hunt Date: Thu, 7 Jul 2022 23:51:29 +0100 Subject: [PATCH] break pip install into two plays --- roles/jupyterhub/tasks/install.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/roles/jupyterhub/tasks/install.yml b/roles/jupyterhub/tasks/install.yml index 671e8a3ea..7a12252cd 100644 --- a/roles/jupyterhub/tasks/install.yml +++ b/roles/jupyterhub/tasks/install.yml @@ -33,22 +33,29 @@ global: yes state: latest -- name: "pip install 7 packages into virtual environment: {{ jupyterhub_venv }} (~217 MB)" +- name: "pip install 3 packages into virtual environment: {{ jupyterhub_venv }} (~217 MB total in two ansible plays)" pip: name: - pip - wheel - - ipywidgets - jupyterhub - - jupyterlab - - jupyterhub_firstuseauthenticator - - jupyterhub-systemdspawner virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyterhub virtualenv_site_packages: no - virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" # 2021-07-29: This works on RasPiOS 10, Debian 11, Ubuntu 20.04 and Mint 20 -- however if you absolutely must use the older Debian 10 -- you can work around errors "can't find Rust compiler" and "This package requires Rust >=1.41.0" if you (1) revert this line to 'virtualenv_command: virtualenv' AND (2) uncomment the line just below + virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" # 2021-07-29: This works on RaspiOS 10, Debian 11, Ubuntu 20.04 and Mint 20 -- however if you absolutely must use the older Debian 10 -- you can work around errors "can't find Rust compiler" and "This package requires Rust >=1.41.0" if you (1) revert this line to 'virtualenv_command: virtualenv' AND (2) uncomment the line just below #virtualenv_python: python3 # 2021-07-29: Was needed when above line was 'virtualenv_command: virtualenv' (generally for Python 2) extra_args: "--no-cache-dir --pre" # 2021-11-30: The "--pre" flag should likely be removed after JupyterHub 2.0.0 is released. +- name: "pip break apart jupyterlab install into two parts - must have conflicting mutual dependency (4 packages)" + pip: + name: + - jupyterlab + - jupyterhub_firstuseauthenticator + - jupyterhub-systemdspawner + - ipywidgets + virtualenv: "{{ jupyterhub_venv }}" # /opt/iiab/jupyterhub + virtualenv_site_packages: no + virtualenv_command: python3 -m venv "{{ jupyterhub_venv }}" + - name: "Install from template: {{ jupyterhub_venv }}/etc/jupyterhub/jupyterhub_config.py" template: src: jupyterhub_config.py.j2