apiVersion: batch/v1
kind: Job
metadata:
 name: capsnet-fashion-trainer
spec:
 template:
  spec:
   securityContext:
    # the group id of the owner of the actual directory behind the volume
    # This is actually a leaking abstraction, but the only solution that I have.
    # A better way would've been to have an appropriate ownership on the mounted dir, I guess...?
    supplementalGroups: [1000]
   containers:
   - name: capsnet-fashion-trainer
     image: smurve/capsnet-fashion-trainer:latest-gpu
     volumeMounts:
     # name must match the volume name below
     - name: ellie
       mountPath: "/var/ellie"
   restartPolicy: Never
   volumes:
   - name: ellie
     persistentVolumeClaim:
      claimName: ellie
 backoffLimit: 1
