Skip to content

Commit

Permalink
Add a MPI elastic example: tensorflow-mnist-elastic.yaml (kubeflow#1812)
Browse files Browse the repository at this point in the history
  • Loading branch information
hex108 authored May 24, 2023
1 parent 6d6d83d commit fc8a644
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions examples/mpi/tensorflow-mnist-elastic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: kubeflow.org/v1
kind: MPIJob
metadata:
name: tensorflow-mnist-elastic
spec:
slotsPerWorker: 1
cleanPodPolicy: Running
mpiReplicaSpecs:
Launcher:
replicas: 1
template:
spec:
containers:
- image: horovod/horovod:0.20.0-tf2.3.0-torch1.6.0-mxnet1.5.0-py3.7-cpu
name: mpi-launcher
command:
- horovodrun
args:
- -np
- "2"
- --min-np
- "1"
- --max-np
- "3"
- --host-discovery-script
- /etc/mpi/discover_hosts.sh
- python
- /examples/elastic/tensorflow2_mnist_elastic.py
resources:
limits:
cpu: 1
memory: 2Gi
Worker:
replicas: 2
template:
spec:
containers:
- image: horovod/horovod:0.20.0-tf2.3.0-torch1.6.0-mxnet1.5.0-py3.7-cpu
name: mpi-worker
resources:
limits:
cpu: 2
memory: 4Gi

0 comments on commit fc8a644

Please sign in to comment.