Skip to content

Commit

Permalink
refactor: install cuda keyring package (autowarefoundation#265)
Browse files Browse the repository at this point in the history
* refactor: install cuda keyring package

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* cosmetic change

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
  • Loading branch information
wep21 and kenji-miyake authored May 3, 2022
1 parent e9d7ad5 commit 8434ded
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions ansible/roles/cuda/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,9 @@
register: cuda_architecture
changed_when: false

- name: Download pin file
become: true
ansible.builtin.get_url:
url: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/{{ cuda_architecture.stdout }}/cuda-ubuntu2004.pin
dest: /etc/apt/preferences.d/cuda-repository-pin-600

- name: Add NVIDIA apt key
become: true
ansible.builtin.apt_key:
url: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/{{ cuda_architecture.stdout }}/3bf863cc.pub

- name: Add CUDA repository into sources.list
become: true
ansible.builtin.apt_repository:
repo: deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/{{ cuda_architecture.stdout }}/ /
filename: cuda
state: present
- name: Install CUDA keyring
ansible.builtin.apt:
deb: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/{{ cuda_architecture.stdout }}/cuda-keyring_1.0-1_all.deb

- name: Get dash-case name of cuda_version
ansible.builtin.shell: bash -c 'sed -e "s/\./-/g" <<< $(echo {{ cuda_version }})'
Expand Down

0 comments on commit 8434ded

Please sign in to comment.