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

Commit

Permalink
Fix wrong nvidia gpu card number (#5353)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzy46 authored Mar 8, 2021
1 parent f0dad8b commit 648d1bc
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 648d1bc

Please sign in to comment.