-
Notifications
You must be signed in to change notification settings - Fork 5
/
5-trainer.yaml
36 lines (35 loc) · 1.07 KB
/
5-trainer.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
apiVersion: batch/v1
kind: Job
metadata:
name: mnist-trainer-{{INCREMENTAL_NUMBER}}
spec:
template:
metadata:
labels:
job-type: trainer
spec:
restartPolicy: Never
containers:
- image: alicek106/ml-kubernetes-mnist:trainer-0.3 # 2019. 03. 16 Added relu share
args: ["--data", "/mnt/data/{{INCREMENTAL_NUMBER}}.npz",
"--epoch", "{{EPOCH}}", "--batch", "{{BATCH}}",
"--savefile", "/mnt/model/{{INCREMENTAL_NUMBER}}-model.h5"]
imagePullPolicy: Always
name: mnist-trainer-job
volumeMounts:
- name: my-pvc-nfs
mountPath: "/mnt"
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "job-type"
operator: In
values:
- trainer
topologyKey: "kubernetes.io/hostname"
volumes:
- name: my-pvc-nfs
persistentVolumeClaim:
claimName: nfs