apiVersion: apps/v1
kind: Deployment
metadata:
  name: evaluator
  namespace: medtune
spec:
  replicas: 1
  selector:
    matchLabels:
      name: evaluator
  template:
    metadata:
      name: evaluator
      labels:
        name: evaluator
    spec:
      nodeSelector:
        cloud.google.com/gke-accelerator: nvidia-tesla-p100
      containers:
      - name: evaluator
        image: medtune/k8s-tf:train-mura-gpu
        args: [
          "--dataset_dir", "/nfs/data/mura",
          "--train_dir", "/nfs/artefacts/mura",
          "--ckpt", "/nfs/weights/mobilenet",
        ]
        env:
          - name: TF_CONFIG
            valueFrom:
              configMapKeyRef:
                name: mura
                key: node.evaluator
        ports:
          - containerPort: 2222
        resources:
          requests:
            cpu: 3000m
            memory: 3000Mi
            nvidia.com/gpu: 1
          limits:
            cpu: 5000m
            memory: 10000Mi
            nvidia.com/gpu: 1

        volumeMounts:
          - mountPath: /nfs
            name: nfs-volume

      volumes:
        - name: nfs-volume
          persistentVolumeClaim:
            claimName: train-pvc

      restartPolicy: Always