apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: "nvidia-smi"
  namespace: kube-system
  labels:
    app.kubernetes.io/name: "nvidia-smi"
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: "nvidia-smi"
  template:
    metadata:
      labels:
        app.kubernetes.io/name: "nvidia-smi"
      name: "nvidia-smi"
    spec:
      nodeSelector:
        #beta.kubernetes.io/instance-type: "p4d.24xlarge"
        processor: gpu
      containers:
      - image: "nvcr.io/nvidia/cuda:9.0-devel"
        #command: ["bash", "-c", "watch nvidia-smi"]
        command: ["bash", "-c", "while true; do date; sleep 10; done"]
        name: "nvidia-smi"
        securityContext:
          runAsNonRoot: false
          runAsUser: 0

