Docker compose equivalent of `docker run –gpu=all` option
After trying it and solving a myriad of problems along the way, I have realized that it is simply the documentation that is out of date. Adding the following yaml block to my docker-compose.yml resulted in nvidia-smi being available to use. deploy: resources: reservations: devices: – driver: nvidia count: 1 capabilities: [gpu]