apiVersion: batch/v1
kind: Job # Deployment will automatically restart when killed. Use Pod if not needed
metadata:
  labels:
    k8s-app: research
  name: abhibha-darts-xray
  namespace: ecepxie
spec:
  template:
    metadata:
      labels:
        k8s-app: research
    spec:
      restartPolicy: Never
      containers:
      - name: research
        image: gitlab-registry.nautilus.optiputer.net/vamsirk/research-containers
        imagePullPolicy: Always
        workingDir: /abhibha-volume/darts-xray/cnn
        command: ["bash", "train.sh"]
        # args:
        #   - for entry in "cnn"/*
        #     do
        #       echo "$entry"
        #     done

        resources:
          requests:
            memory: "8Gi"
            cpu: "2"
            nvidia.com/gpu: 2
          limits:
            memory: "8Gi"
            cpu: "2"
            nvidia.com/gpu: 2
        volumeMounts:
        - mountPath: /abhibha-volume
          name: abhibha-volume
      volumes:
        - name: abhibha-volume
          persistentVolumeClaim:
            claimName: abhibha-volume
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: gpu-type
                operator: In # Use NotIn for other types
                values:
                - 1080Ti
