GPU and Runtime Support in Mesos-compose
The next version of Mesos-Compose will support GPUs from NVIDIA and AMD for the Docker Executor.
For NVIDIA GPUs, you need to add the following to a Service entry in mesos-compose.yaml:
gpus:
driver: "nvidia"
device: 1
The Device is here the number of the GPU.
For AMD GPUs, it looks slightly different:
gpus:
driver: "amd"
Here you don’t need to specify a device, since Apache Mesos only supports NVIDIA and the Mesos Offers do not contain any GPU information for AMD. Mesos-Compose will therefore assign all GPUs to the Docker Container.
Furthermore, I have implemented the Docker “Runtime” feature. With this, it is now possible to use runtimes like runcvm via Mesos-Compose.
Here you add the following under deploy in mesos-compose.yaml:
deploy:
runtime: "runcvm"
Of course, any other Docker-supported Runtime can also be specified.