<p>I'd like to mount a PVC to a (katib) Job specification but can't find anything in the documentation nor any example?</p>
<p>I'm pretty sure that this should be possible as a Job is orchestrating pods and pods can do so. Or am I missing something?</p>
<p>Please find below the respective (katib) job specification</p>
<pre><code>apiVersion: batch/v1
kind: Job
spec:
  template:
    spec:
      containers:
      - env:
        - name: training-container
          image: docker.io/romeokienzler/claimed-train-mobilenet_v2:0.3
          command:
            - &quot;ipython&quot;
            - &quot;/train-mobilenet_v2.ipynb&quot;
            - &quot;optimizer=${trialParameters.optimizer}&quot;
      restartPolicy: Never
</code></pre>

Romeo Kienzler
<p>You can add the volume and volume mount to your Katib job template so that all the HPO jobs on Katib can share the same volumes. e.g.</p>
<pre><code>apiVersion: batch/v1
kind: Job
spec:
  template:
    spec:
      containers:
        - name: training-container
          image: docker.io/romeokienzler/claimed-train-mobilenet_v2:0.4
          command:
            - &quot;ipython&quot;
            - &quot;/train-mobilenet_v2.ipynb&quot;
            - &quot;optimizer=${trialParameters.optimizer}&quot;
          volumeMounts:
            - mountPath: /data/
              name: data-volume
      restartPolicy: Never
      volumes:
          - name: data-volume
            persistentVolumeClaim:
              claimName: data-pvc
</code></pre>
<p>Also make sure your pvc is read write many so the pod on different nodes can mount on the same volume at the same time.</p>
