mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
venv runs without jupyterlab-vim
This commit is contained in:
parent
9cd837cea5
commit
613d08f499
4 changed files with 44 additions and 2 deletions
2
roles/jupyter/defaults/main.yml
Normal file
2
roles/jupyter/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
notebook_dir: /opt/iiab/notebook
|
||||||
|
jupyter_venv: /opt/iiab/jupyter
|
17
roles/jupyter/tasks/install.yml
Normal file
17
roles/jupyter/tasks/install.yml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
- name: Make the directories to hold notebooks
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: '{{ notebook_dir }}'
|
||||||
|
|
||||||
|
- name: Use pip to install into a virtual environment
|
||||||
|
pip:
|
||||||
|
name:
|
||||||
|
- jupyterlab
|
||||||
|
#- jupyter_vim
|
||||||
|
virtualenv: "{{ jupyter_venv }}" # /opt/iiab/jupyter
|
||||||
|
virtualenv_site_packages: no
|
||||||
|
virtualenv_command: /usr/bin/virtualenv
|
||||||
|
virtualenv_python: python3
|
||||||
|
extra_args: "--no-cache-dir"
|
||||||
|
when: internet_available
|
||||||
|
|
23
roles/jupyter/tasks/main.yml
Normal file
23
roles/jupyter/tasks/main.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
- name: Install Jupyter if jupyter_installed not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
|
||||||
|
include_tasks: install.yml
|
||||||
|
when: jupyter_installed is undefined
|
||||||
|
|
||||||
|
|
||||||
|
#- include_tasks: enable-or-disable.yml
|
||||||
|
|
||||||
|
|
||||||
|
- name: Add 'jupyter' variable values to {{ iiab_ini_file }}
|
||||||
|
ini_file:
|
||||||
|
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
|
||||||
|
section: jupyter
|
||||||
|
option: "{{ item.option }}"
|
||||||
|
value: "{{ item.value | string }}"
|
||||||
|
with_items:
|
||||||
|
- option: name
|
||||||
|
value: Jupyter
|
||||||
|
- option: description
|
||||||
|
value: '"Raspberry Pi Jupyter python programming environment"'
|
||||||
|
- option: install
|
||||||
|
value: "{{ jupyter_install }}"
|
||||||
|
- option: enabled
|
||||||
|
value: "{{ jupyter_enabled }}"
|
|
@ -564,8 +564,8 @@ phpmyadmin_enabled: False
|
||||||
vnstat_install: False
|
vnstat_install: False
|
||||||
vnstat_enabled: False
|
vnstat_enabled: False
|
||||||
|
|
||||||
jupyterhub_install: False
|
jupyter_install: False
|
||||||
jupyterhub_enabled: False
|
jupyter_enabled: False
|
||||||
|
|
||||||
# 9-LOCAL-ADDONS
|
# 9-LOCAL-ADDONS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue