Skip to content
Snippets Groups Projects
Commit a983678f authored by Daniel Müller's avatar Daniel Müller :speech_balloon:
Browse files

Install into venv instead of system

All mp packages and also jupyter are now installed into a venv.
This should avoid conflicts with global python packages.
parent 6646e4d3
No related branches found
No related tags found
No related merge requests found
...@@ -5,8 +5,7 @@ Description=Jupyter Lab ...@@ -5,8 +5,7 @@ Description=Jupyter Lab
Type=simple Type=simple
PIDFile=/run/jupyter.pid PIDFile=/run/jupyter.pid
# Password: [empty string] # Password: [empty string]
ExecStart=/usr/bin/python3 -m jupyterlab --ip="0.0.0.0" ExecStart=/home/{{ target_user }}/.ml-venv/bin/jupyter-lab --ip="0.0.0.0" --notebook-dir=/home/{{ target_user }}/notebooks --no-browser --NotebookApp.password='sha1:9a2d316959ac:843b251c27024afb46174ce40ce0ebebcf29217b'
--notebook-dir=/home/{{ target_user }}/notebooks --no-browser --NotebookApp.password='sha1:9a2d316959ac:843b251c27024afb46174ce40ce0ebebcf29217b'
User={{ target_user }} User={{ target_user }}
Group={{ target_user }} Group={{ target_user }}
Restart=always Restart=always
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
update_cache: true update_cache: true
- name: Install jupyter-lab - name: Install jupyter-lab
become: true
pip: pip:
executable: pip3 virtualenv_command: /usr/bin/python3 -m venv
virtualenv: "/home/{{ target_user }}/.ml-venv"
name: jupyterlab name: jupyterlab
state: present state: present
...@@ -39,3 +39,4 @@ ...@@ -39,3 +39,4 @@
state: started state: started
enabled: true enabled: true
daemon_reload: true daemon_reload: true
numpy==1.21.*
matplotlib==3.4.*
pandas==1.3.*
Pillow==8.4.*
scikit-learn==1.0.*
...@@ -12,25 +12,23 @@ ...@@ -12,25 +12,23 @@
state: present state: present
update_cache: true update_cache: true
- name: Remove conflicting apt packages - name: Copy requirements.txt to remote fs
become: true copy:
apt: src: files/requirements.txt
name: dest: /tmp/ml-requirements.txt
- python3-pil
- python3-numpy
state: absent
- name: Install ml python packages - name: Install ml python packages
become: true
pip: pip:
executable: pip3 virtualenv_command: /usr/bin/python3 -m venv
name: requirements: /tmp/ml-requirements.txt
- numpy virtualenv: "/home/{{ target_user }}/.ml-venv"
- sklearn # name:
- matplotlib # - numpy
- pandas # - sklearn
- Pillow # - matplotlib
# - pandas
# - Pillow
# - torch # - torch
# - torchvision # - torchvision
# - fastai # - fastai
state: present # state: present
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment