5. マネージド GPU クラスターでの GPU を使用したアプリケーションのデプロイ
1
kubectl get nodes -o json | jq '.items[].metadata.labels'
2
Nvidia-smi
#Syntax:
nvidia.com/gpu: <number-of-GPUs>
#Example:
nvidia.com/gpu: 1
#Example deployment using GPU
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-gpu-app
spec:
replicas: 1
selector:
matchLabels:
component: gpu-app
template:
metadata:
labels:
component: gpu-app
spec:
containers:
- name: gpu-container
securityContext:
capabilities:
add:
- SYS_ADMIN
resources:
limits:
nvidia.com/gpu: 1
image: nvidia/samples:dcgmproftester-2.0.10-cuda11.0-ubuntu18.04
command: ["/bin/sh", "-c"]
args:
- while true; do /usr/bin/dcgmproftester11 --no-dcgm-validation -t 1004 -d 300; sleep 30; Last updated
Was this helpful?
