Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Fix wrong nvidia gpu card number #5353

Merged
merged 3 commits into from
Mar 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@

- name: "Check NVIDIA GPU card number is matched or not"
set_fact:
unmet_requirements: "{{ unmet_requirements + [\"NVIDIA GPU card number is not matched: {{ computing_device_count }} specified but only {{ nvidia_gpu_count.stdout_lines[0] }} found\"] }}"
unmet_requirements: "{{ unmet_requirements + [\"NVIDIA GPU card number is not matched: {{ computing_device_count }} specified but {{ nvidia_gpu_count.stdout|trim }} found\"] }}"
changed_when: false
check_mode: false
environment: {}
when:
# if nvidia-smi doesn't work, we can skip this step
- nvidia_smi.rc == 0
- "nvidia_gpu_count.stdout_lines[0]|int != computing_device_count"
- 'nvidia_gpu_count.stdout|trim|int != computing_device_count'
- nvidia_gpu_count.rc == 0

- name: "Check default docker runtime"
Expand Down