15 lines
559 B
YAML
15 lines
559 B
YAML
- name: Deploy NVIDIA device plugin
|
|
shell: kubectl apply -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v0.14.5/nvidia-device-plugin.yml
|
|
args:
|
|
executable: /bin/bash
|
|
when: master_ips|length > 0 and inventory_hostname == (master_ips | first)
|
|
|
|
- name: Run CUDA validation pod
|
|
shell: |
|
|
kubectl run gpu-test --image=nvidia/cuda:12.3.2-base-ubuntu22.04 --restart=Never -- nvidia-smi
|
|
kubectl delete pod gpu-test --wait
|
|
args:
|
|
executable: /bin/bash
|
|
when: master_ips|length > 0 and inventory_hostname == (master_ips | first)
|
|
|