Docker Community Forums

Share and learn in the Docker community.

How to make "--gpus all" the default

I’m using docker on an nvidia enabled host. Started with Docker 19.x the installation and usage are slightly different. There’s no nvidia runtime anymore which I could put it to daemon.json, but we can achieve the same by passing eg. “–gpus all” to docker run.

However, I have a pretty rigid environment where I can’t simply pass it to docker run, so I need to make this behaviour as the default somehow. But I can’t find how in the docs.

So my question is how to make it work, how to use the gpus without specifying it for docker run?

Janos

1 Like

Hey did you end up finding a solution for this? I’m having the same issue