I created an image docker based on Ubuntu 16.04 and with all the dependencies needed to run MPI.
Publicly on the docker hub: https://hub.docker.com/r/orwel84/ubuntu-16-mpi/
I use this image to create an MPI container. I can also compile a simple mpi-hello-world.c (which comes in the container) and run it with mpirun.
These are the steps I'm using, and (if you have Docker installed, you can reproduce them):
docker run -it orwel84/ubuntu-16-mpi bash- (on container)
mpirun -np 4 --allow-run-as-root ./mpi_hello_world
You will see Output:
Hello world from processor 6f9b11cef939, rank 0 out of 4 processors Hello world from processor 6f9b11cef939, rank 1 out of 4 processors Hello world from processor 6f9b11cef939, rank 2 out of 4 processors Hello world from processor 6f9b11cef939, rank 3 out of 4 processors
Question:
Currently, all of the above four mpi processes are running inside the same container.
How to use mpirun to run in multiple containers on the same host? And also how can I use Docker swarm to run a swarm on multiple nodes?
Please, help. Thankyou.
source share