-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGPUs.yaml
49 lines (40 loc) · 1.14 KB
/
GPUs.yaml
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
49
---
- name: Configure compute instances
hosts: GPUs
become: true
tasks:
- name: Set hostname
shell: hostnamectl set-hostname BM.GPU3.8
- name: Set timezone
shell: timedatectl set-timezone Europe/London
- name: Install and upgrade pip
pip:
name: pip
extra_args: --upgrade
executable: pip3
- name: Install PyTorch
pip:
name:
- torch
- torchvision
- torchaudio
executable: pip3
extra_args: --extra-index-url https://download.pytorch.org/whl/cpu
- name: Add Nvidia repo key
rpm_key:
key: https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/7fa2af80.pub
- name: Add Nvidia repo
yum_repository:
name: nvidia
description: Nvidia repo
baseurl: https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64
enabled: yes
gpgcheck: yes
- name: Install latest kernel headers
yum:
name: kernel-devel
state: latest
- name: Install CUDA toolkit
ansible.builtin.yum:
name: cuda-toolkit-10-0
state: present