From 8e7925ab87435b2592bf81fd6d4c05bfcc08b2aa Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Tue, 3 Sep 2024 10:42:14 +0200 Subject: [PATCH] Fix error with nvidia docker --- tasks/Debian.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 4cda1ca..bf9a35f 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -76,25 +76,24 @@ - block: - set_fact: - nvidia_repo_name: nvidia-docker nvidia_package_name: nvidia-docker2 when: not docker_containerd_only | bool - set_fact: - nvidia_repo_name: nvidia-container-runtime nvidia_package_name: nvidia-container-runtime when: docker_containerd_only | bool - - name: Download {{nvidia_repo_name}} apt list + - name: Download nvidia repo apt list get_url: - url: https://nvidia.github.io/{{nvidia_repo_name}}/{{ansible_distribution | lower}}{{ansible_distribution_version}}/{{nvidia_repo_name}}.list - dest: /etc/apt/sources.list.d/{{nvidia_repo_name}}.list + url: https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list + dest: /etc/apt/sources.list.d/nvidia-container-toolkit.list register: apt_list - name: Add nvidia-docker repo key - apt_key: - url: "https://nvidia.github.io/{{nvidia_repo_name}}/gpgkey" - state: present + get_url: + url: "https://nvidia.github.io/libnvidia-container/gpgkey" + dest: /etc/apt/trusted.gpg.d/nvidia-container-toolkit.asc + mode: '0644' - name: Ubuntu apt update apt: update_cache=yes