Skip to content

Commit

Permalink
add proxy for libnvidia-container step
Browse files Browse the repository at this point in the history
  • Loading branch information
buxiaomo committed Jan 21, 2025
1 parent 9418257 commit 42a9b7a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion roles/containerd/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
apt:
name: "nvidia-container-runtime"
state: present
update_cache: yes
update_cache: yes
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"
5 changes: 4 additions & 1 deletion roles/containerd/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
get_url:
url: https://nvidia.github.io/nvidia-container-runtime/{{ ansible_distribution | lower }}{{ ansible_distribution_major_version }}/nvidia-container-runtime.repo
dest: /etc/yum.repos.d/nvidia-container-runtime.repo
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"


- name: Install nvidia-container-runtime
yum:
name: nvidia-container-runtime
state: latest
state: latest
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"
4 changes: 3 additions & 1 deletion roles/containerd/tasks/SUSE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ansible.builtin.rpm_key:
state: present
key: https://nvidia.github.io/libnvidia-container/gpgkey
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"

- name: Add specified repository into sources
community.general.zypper_repository:
Expand All @@ -12,4 +13,5 @@
community.general.zypper:
name: nvidia-container-runtime
state: latest
update_cache: yes
update_cache: yes
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"
3 changes: 2 additions & 1 deletion roles/docker/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
apt:
name: "nvidia-container-runtime"
state: present
update_cache: yes
update_cache: yes
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"
4 changes: 3 additions & 1 deletion roles/docker/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
get_url:
url: https://nvidia.github.io/nvidia-container-runtime/{{ ansible_distribution | lower }}{{ ansible_distribution_major_version }}/nvidia-container-runtime.repo
dest: /etc/yum.repos.d/nvidia-container-runtime.repo
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"

- name: Install nvidia-container-runtime
yum:
name: nvidia-container-runtime
state: latest
state: latest
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"
5 changes: 4 additions & 1 deletion roles/docker/tasks/SUSE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
ansible.builtin.rpm_key:
state: present
key: https://nvidia.github.io/libnvidia-container/gpgkey
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"


- name: Add specified repository into sources
community.general.zypper_repository:
Expand All @@ -12,4 +14,5 @@
community.general.zypper:
name: nvidia-container-runtime
state: latest
update_cache: yes
update_cache: yes
environment: "{{ proxy_env | default({'http_proxy': '', 'https_proxy': '', 'no_proxy': ''}) }}"

0 comments on commit 42a9b7a

Please sign in to comment.