-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmpijob-bibw.yaml
65 lines (65 loc) · 2.08 KB
/
mpijob-bibw.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
apiVersion: kubeflow.org/v2beta1
kind: MPIJob
metadata:
label:
profile: rootless
name: osu-mpi-bibw
spec:
sshAuthMountPath: /home/mpi/.ssh
cleanPodPolicy: Running
slotsPerWorker: 1
mpiReplicaSpecs:
Launcher:
replicas: 1
template:
spec:
initContainers:
- name: wait-hostfilename
image: image-registry.openshift-image-registry.svc:5000/mpi-benchmark/mpi:base
command:
- bash
- -cx
- "[[ $(cat /etc/mpi/hostfile | wc -l) != 0 ]] && (date; echo 'Hostfile is ready'; cat /etc/mpi/hostfile) || (date; echo 'Hostfile not ready ...'; sleep 10; exit 1) && while read host; do while ! ssh $host echo $host ; do date; echo \"Pod $host is not up ...\"; sleep 10; done; date; echo \"Pod $host is ready\"; done <<< \"$(cat /etc/mpi/hostfile)\""
volumeMounts:
- mountPath: /etc/mpi
name: mpi-job-config
- mountPath: /home/mpi/.ssh
name: ssh-auth
containers:
- name: mpi-launcher
command:
- mpirun
- --allow-run-as-root
- -np
- "2"
- -bind-to
- none
- -map-by
- slot
- -mca
- pml
- ob1
- -mca
- btl
- ^openib
- /opt/osu-micro-benchmarks/libexec/osu-micro-benchmarks/mpi/pt2pt/osu_bibw
image: image-registry.openshift-image-registry.svc:5000/mpi-benchmark/mpi:base
imagePullPolicy: Always
Worker:
replicas: 2
template:
metadata:
labels:
app: mpi-app
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: mpi-app
containers:
- name: mpi-worker
image: image-registry.openshift-image-registry.svc:5000/mpi-benchmark/mpi:osu-mpi
imagePullPolicy: Always