forked from openshift-psap/matrix-benchmarking
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exec: mpi-benchmark: add proper rootless execution
- Loading branch information
Showing
7 changed files
with
133 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,4 @@ | |
apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
namespace: mpi-benchmark | ||
name: mpi-bench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
apiVersion: kubeflow.org/v2beta1 | ||
kind: MPIJob | ||
metadata: | ||
label: | ||
profile: rootless | ||
name: hello-world | ||
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-benchmarking/mpi-bench: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 | ||
- bash | ||
- -c | ||
- echo Hello World from $(cat /proc/sys/kernel/hostname) | ||
image: image-registry.openshift-image-registry.svc:5000/mpi-benchmarking/mpi-bench: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-benchmarking/mpi-bench:base | ||
imagePullPolicy: Always | ||
command: | ||
- /usr/sbin/sshd | ||
- -De | ||
- -f | ||
- /home/mpi/custom_ssh/sshd_config | ||
|