Similar to containerizing the ADO process, the MCAS server process can also run within a container. This document shows how to build and run the MCAS server inside container. Note this is different from ADO Docker Containerization which only launches ADO processes inside container.
-
Follow Ubuntu install instructions or Fedora install instructions to install docker.
-
Add your user id into the docker group for non-root execution.
Follow Quick Start for system configuration and instructions on how to install kernel modules xpmem.ko
and mcasmod
.
On Docker Hub (https://hub.docker.com/) create an account and a registry.
- Build image (e.g.):
docker build -f $MCAS_HOME/deploy/docker/Dockerfile.mcas-ubuntu-18 -t <your-docker-username>/ibm-mcas-runtime:ubuntu18 .
docker build -f $MCAS_HOME/deploy/docker/Dockerfile.mcas-fc-27 -t <your-docker-username>/ibm-mcas-runtime:fc27 .
- (Optional) Push image to Docker Hub, e.g.:
docker login
docker push <your-docker-username>/ibm-mcas-runtime:ubuntu18
- If running with RDMA:
docker run --rm -it --privileged --cap-add=ALL -v /dev:/dev -v /lib/modules:/lib/modules --net=host --device=/dev/infiniband/uverbs0 --device=/dev/infiniband/rdma_cm --ulimit memlock=-1 <your-docker-username>/ibm-mcas-runtime:ubuntu18 bash
- If running with standard sockets:
docker run --rm -it --privileged --cap-add=ALL -v /dev:/dev -v /lib/modules:/lib/modules --ulimit memlock=-1 <your-docker-username>/ibm-mcas-runtime:ubuntu18 bash
After getting into the bash console, your mcas binary is located in
/mcas/build/dist
. Then you can continue following Quick
Start to launch MCAS server. Another container can
be launched as a client with the same command as server. See
Kubernetes for deploying containers on a kubernetes
cluster (different nodes).