-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpi-operator-test.yaml
101 lines (101 loc) · 3.26 KB
/
mpi-operator-test.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
apiVersion: kubeflow.org/v2beta1
kind: MPIJob
metadata:
name: my-container-workflow
spec:
slotsPerWorker: 1
sshAuthMountPath: /home/mpiuser/.ssh
runPolicy:
cleanPodPolicy: Running
mpiReplicaSpecs:
Launcher:
replicas: 1
template:
spec:
nodeSelector:
kubernetes.io/hostname: kind-worker2
tolerations:
- effect: NoSchedule
key: cray.nnf.node
operator: Equal
value: "true"
securityContext:
fsGroup: 1005
volumes:
- name: passwd
emptyDir: {}
- name: foo-local-storage
hostPath:
path: "/mnt/nnf/06020ad9-28d4-451b-ab27-00eda8f8ecb6-0"
type: Directory
initContainers:
- name: container-mpi-init
image: ghcr.io/nearnodeflash/nnf-container-example:latest
command:
- /bin/sh
- -c
- |
# tie the mpiuser to the UID/GID
sed -i '/^mpiuser/d' /etc/passwd
echo "mpiuser:x:1041:1005::/home/mpiuser:/bin/sh" >> /etc/passwd
cp /etc/passwd /config/
exit 0
volumeMounts:
- name: passwd
mountPath: "/config"
containers:
- name: my-container-workflow
image: ghcr.io/nearnodeflash/nnf-mfu:latest
env:
- name: DW_JOB_foo_local_storage
value: /mnt/nnf/06020ad9-28d4-451b-ab27-00eda8f8ecb6-0
command:
- mpirun
- --allow-run-as-root
- -np
- "2"
- dcmp
- "$(DW_JOB_foo_local_storage)/0"
- "$(DW_JOB_foo_local_storage)/1"
volumeMounts:
- name: passwd
mountPath: "/etc/passwd"
subPath: "passwd"
- name: foo-local-storage
mountPath: "/mnt/nnf/06020ad9-28d4-451b-ab27-00eda8f8ecb6-0"
securityContext:
runAsNonRoot: true
runAsUser: 1041
runAsGroup: 1005
Worker:
replicas: 2
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- kind-worker2
- kind-worker3
tolerations:
- effect: NoSchedule
key: cray.nnf.node
operator: Equal
value: "true"
volumes:
- name: foo-local-storage
hostPath:
path: "/mnt/nnf/06020ad9-28d4-451b-ab27-00eda8f8ecb6-0"
type: Directory
securityContext:
fsGroup: 1005
containers:
- image: ghcr.io/nearnodeflash/nnf-mfu:latest
name: my-container-workflow
volumeMounts:
- name: foo-local-storage
mountPath: "/mnt/nnf/06020ad9-28d4-451b-ab27-00eda8f8ecb6-0"