apiVersion: v1
kind: Pod
metadata:
  name: nvidia-test
  namespace: nvidia 
spec:
  restartPolicy: OnFailure
  nodeSelector: 
    # type: infra
    kubernetes.io/hostname: node-otii.crmi.cn
  containers:
    - name: nvidia-test
      image: "registry.crmi.cn:5021/nvidia/tensorrt:wzh"
      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
