apiVersion: v1
kind: Pod
metadata:
  name: cuda-vector-add
  namespace: nvidia 
spec:
  restartPolicy: OnFailure
  containers:
    - name: cuda-vector-add
      image: "docker.io/mirrorgooglecontainers/cuda-vector-add:v0.1"
      env:
        - name: NVIDIA_VISIBLE_DEVICES
          value: all
        - name: NVIDIA_DRIVER_CAPABILITIES
          value: "compute,utility"
        - name: NVIDIA_REQUIRE_CUDA  
          value: "cuda>=5.0"
      securityContext:
        allowPrivilegeEscalation: false
        capabilities:
          drop: ["ALL"]
        seLinuxOptions:
          type: nvidia_container_t
      resources:
        limits:
          nvidia.com/gpu: 1 # requesting 1 GPU
