apiVersion: apps/v1
kind: Deployment
metadata:
  name: torch-pod-aesteva-1gpu-16cpu
  namespace: sfr-ns-aesteva
spec:
  selector:
    matchLabels:
      app: torch-pod-aesteva-1gpu-16cpu
  replicas: 1
  template:
    metadata:
      labels:
        app: torch-pod-aesteva-1gpu-16cpu
    spec:
      restartPolicy: Always
      volumes:
        - name: sfr-home-pv-aesteva
          persistentVolumeClaim:
            claimName: sfr-home-pvc-aesteva
        - name: sfr-share-pv-aesteva
          persistentVolumeClaim:
            claimName: sfr-share-pvc-aesteva
        - name: sfr-medical-ai-pv-aesteva
          persistentVolumeClaim:
            claimName: sfr-medical-ai-pvc-aesteva
        - name: dshm
          emptyDir:
            medium: Memory
      tolerations:
      - key: "gpu_num"
        operator: "Equal"
        value: "2"
        effect: "NoSchedule"
      containers:
        - name: torch-pod-aesteva-1gpu-16cpu
          image: "gcr.io/salesforce-research-internal/torch-pod-aesteva"
          command: ["sleep", "5d"]
          ports:
          - containerPort: 8888
          resources:
            limits:
              nvidia.com/gpu: 2
          volumeMounts:
            - name: sfr-home-pv-aesteva
              mountPath: "/export/home"
            - name: sfr-share-pv-aesteva
              mountPath: "/export/share"
            - name: sfr-medical-ai-pv-aesteva
              mountPath: "/export/medical_ai"
            - name: dshm
              mountPath: /dev/shm
          securityContext:
            privileged: true
