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

+1
I am having the same problem.
I need to run docker containers from gitlab-runner with executor docker. Are there any options for how to do this by default from docker engine ?