apiVersion: batch/v1
kind: Job
metadata:
  name: pytorch-cpu-simple
  namespace: default
spec:
  template:
    spec:
      containers:
      - name: cpu-pytorch
        image: docker.io/mapler/pytorch-cpu:latest
        volumeMounts:
        - mountPath: /pyscript
          name: torch-job-volume
        command: ["bash","-c","python /pyscript/pytorchcpu-example.py"]
      restartPolicy: Never
      volumes:
      - name: torch-job-volume
        hostPath:
          path: /home/k8s/torch-example
