---
apiVersion: batch/v1
kind: Job
metadata:
  name: create-tf-record
spec:
  template:
    spec:
      containers:
      - name: create-tf-record
        image: lcastell/pets_object_detection
        imagePullPolicy: IfNotPresent
        workingDir: "/"
        command: ["python", "models/research/object_detection/dataset_tools/create_pet_tf_record.py", "--label_map_path=models/research/object_detection/data/pet_label_map.pbtxt", "--data_dir=/pets_data", "--output_dir=/pets_data"]
        volumeMounts:
          - mountPath: "/pets_data"
            name: pets-data
      volumes:
        - name: pets-data
          persistentVolumeClaim:
            claimName: pets-data-claim
      restartPolicy: Never

  backoffLimit: 4