diff options
Diffstat (limited to 'docker-nvidia')
-rw-r--r-- | docker-nvidia/meta/main.yml | 3 | ||||
-rw-r--r-- | docker-nvidia/tasks/main.yml | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/docker-nvidia/meta/main.yml b/docker-nvidia/meta/main.yml new file mode 100644 index 0000000..eec3550 --- /dev/null +++ b/docker-nvidia/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - { role: docker-ce } diff --git a/docker-nvidia/tasks/main.yml b/docker-nvidia/tasks/main.yml new file mode 100644 index 0000000..963e6bc --- /dev/null +++ b/docker-nvidia/tasks/main.yml @@ -0,0 +1,19 @@ +--- +- name: Add nvidia-docker GPG apt-key + apt_key: + url: https://nvidia.github.io/nvidia-docker/gpgkey + id: C95B321B61E88C1809C4F759DDCAE044F796ECB0 + become: yes + +- name: Add nvidia-docker repository in /etc/apt/sources.list.d + get_url: + url: "https://nvidia.github.io/nvidia-docker/{{ ansible_distribution | lower }}{{ ansible_distribution_version }}//nvidia-docker.list" + dest: /etc/apt/sources.list.d/nvidia-docker.list + checksum: sha256:1727985494fbd19e3b963880d15117487435cbabef4e295484111f003cf03d41 + become: yes + +- name: Update and install nvidia-container-toolkit + apt: + name: nvidia-container-toolkit + update_cache: yes + become: yes |