apiVersion: batch/v1
kind: Job
metadata:
  name: graph-gen-job-subset
  labels:
    jobgroup: anomaly-graph-job
spec:
  template:
    spec:
      priorityClassName: nice
      containers:
      - name: postprocessing
        image:  gitlab-registry.nautilus.optiputer.net/stsan9/anomalydetection4jets:latest
        command:
        - "python"
        args:
        - "/opt/repo/GraphAE/code/gen_gae_dataset.py"
        - --dataset
        - "/anomalyvol/data/datatest/"
        - --n-proc
        - "10"
        - --n-events
        - "1000"
        - --bb
        - "0"
        - --n-events-merge
        - "100"
        - --features
        - "xyz"
        volumeMounts:
        - mountPath: /anomalyvol
          name: anomalyvol-2
        - name: git-repo
          mountPath: /opt/repo
        resources:
          limits:
            memory: 128Gi
            cpu: "10"
            #nvidia.com/gpu: "1"
          requests:
            memory: 64Gi
            cpu: "10"
            #nvidia.com/gpu: "1"    
      initContainers:
      - name: init-clone-repo
        image: alpine/git
        args:
          - clone
          - --single-branch
          - https://github.com/AnthonyAportela/GraphAE
          - -b
          - main
          - /opt/repo/GraphAE
        volumeMounts:
          - name: git-repo
            mountPath: /opt/repo
      volumes:
      - name: git-repo
        emptyDir: {}
      - name: anomalyvol-2
        persistentVolumeClaim:
          claimName: anomalyvol-2
      restartPolicy: Never
  backoffLimit: 5
