1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

break pip install into two plays

This commit is contained in:
George Hunt 2022-07-07 23:51:29 +01:00
parent 4c7369cd7a
commit 21ee498b73

View file

@ -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