-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpython.yml
More file actions
48 lines (45 loc) · 1.4 KB
/
python.yml
File metadata and controls
48 lines (45 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
- name: python
hosts: all
tags:
- bootstrap
- python3
- python
vars:
- python_packages:
- python-dev
- python-pip
- python-setuptools
- python-virtualenv
- python-wheel
- python3-dev
# - python3-opencv
- python3-pip
- python3-setuptools
- python3-venv
- python3-wheel
- python_pip3_packages:
# TODO: figure out cuda version automatically
- http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl
- matplotlib
- ipython
- numpy
- scipy
- https://github.com/mind/wheels/releases/download/tf1.8-gpu-cuda91-nomkl/tensorflow-1.8.0-cp36-cp36m-linux_x86_64.whl
- torchvision
- python_packages_state: present
- python_pip3_packages_state: "{{ python_packages_state }}"
tasks:
- include_tasks: apt.yml apt_packages_state="{{ python_packages_state }}"
- name: "python | Configure"
apt:
name: "{{ item.name | default(item) }}"
state: "{{ item.state | default(python_packages_state) }}"
with_items: "{{ python_packages }}"
become: yes
- name: "python | Configure pip3"
pip:
name: "{{ item.name | default(item) }}"
state: "{{ item.state | default(python_pip3_packages_state) }}"
executable: pip3
with_items: "{{ python_pip3_packages }}"
become: yes