apiVersion: v1
kind: Pod
metadata:
  name: pytorch-pod
spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: gpu-type
            operator: In
            values:
            - 2080Ti
  tolerations:
  - key: "nautilus.io/general"
    operator: "Exists"
    effect: "NoSchedule"  
  containers:
  - name: gpu-container
    image: daemonslayer/pod:pytorch
    imagePullPolicy: Always
    command: ["sleep", "infinity"]
    resources:
      limits:
        cpu: 1
        nvidia.com/gpu: 1
        memory: 12Gi
      requests:
        cpu: 1
        memory: 12Gi
        nvidia.com/gpu: 1
    volumeMounts:
    - mountPath: /creativeflow
      name: creativeflow
  restartPolicy: Never
  volumes:
    - name: creativeflow
      persistentVolumeClaim:
        claimName: creativeflow
