Deploy applications
Step 1: Check the GPU configuration using the following command:
kubectl get nodes -o json | jq '.items[].metadata.labels'
Example: The image below shows a worker using Metal Cloud GPU H100, with the strategy configuration: all-disable, status: success.
Step 2: Check the GPU instance configuration on the worker by SSHing into the node and typing the following command:
Nvidia-smi
The example below shows that the GPU driver has been successfully installed and is running with 8 GPUs in None mode.
👉 Example of deploying an application using the GPU:
#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
