Skip to content
Snippets Groups Projects
  • Daniel Müller's avatar
    f1fb94db
    Optimize apt usage · f1fb94db
    Daniel Müller authored
    - Moved `python3-pip` and `python3-venv` into local.yml as base dependencies
    - Update apt cache while installing base dependencies in local.yml
    - Remove redundant installs and cache updates from roles
    f1fb94db
    History
    Optimize apt usage
    Daniel Müller authored
    - Moved `python3-pip` and `python3-venv` into local.yml as base dependencies
    - Update apt cache while installing base dependencies in local.yml
    - Remove redundant installs and cache updates from roles
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
main.yml 737 B
---
# roles/jupyter-lab

- name: Notebooks dir
  file:
    path: "/home/{{ target_user }}/notebooks"
    state: directory
    owner: "{{ target_user }}"
    group: "{{ target_user }}"

- name: Install jupyter-lab
  pip:
    virtualenv_command: /usr/bin/python3 -m venv
    virtualenv: "/home/{{ target_user }}/.ml-venv"
    name: jupyterlab
    state: present

- name: Install systemd service
  become: true
  template:
    src: files/jupyter.service
    dest: /etc/systemd/system/jupyter.service
    mode: '0644'
  when: jupyter_service

- name: Start Jupyter-Lab service
  become: true
  systemd:
    name: jupyter
    state: started
    enabled: true
    daemon_reload: true
  when: jupyter_service