-
Notifications
You must be signed in to change notification settings - Fork 2k
docker-compose support #1073
Comments
Exactly this, how can one use |
I'm encountering the same problem. Putting "runtime:nvidia" in docker-compose does not work, even if I follow the instructions from wiki. |
Same problem - |
Hello! Docker-compose support still works with the What I think you are asking is does docker-compose support the `--gpus option? The answer is not yet! |
@RenaudWasTaken Per the documentation it says to set it this way
In the newest version of nvidia-docker, there is no |
You need to install the old |
So in order to work with docker-compose with the latest nvidia-docker, I need to also install the older nvidia-docker2? |
Nope, what I'm saying above is that the support in docker-compose for But you can still use the support for |
What do you mean "by installing |
On the readme:
Replace the line:
By:
|
More detail discussion and progress are in Compose's issue. |
I tried
|
this is my daemon.json {
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2",
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
} docker run --runtime=nvidia works fine |
@leon0707 You have to use at least version 2.3 in your docker-compose.yml. You might have to update docker-compose to be able to do that: https://docs.docker.com/compose/install/ |
1. Issue or feature description
not able to run containers with GPU acceleration from docker compose
With nvidia-docker2 I was able to run GPU accelerated containers by defining the
nvidia
runtime within the file/etc/docker/daemon.json
:and then use the
runtime
key within the docker compose file (or set thenvidia
runtime as the default one)With the new version of Nvidia-docker,
nvidia container toolkit
this doesn't work anymore, since a dedicated runtime should not been run anymore, instead the flag--gpus
needs to be provided (or at least this is my understanding).However, the wiki still suggests the 'runtime' solution, is that right ? Furthermore, the current installation doesn't provide the `/usr/bin/nvidia-container-runtime' file anymore
How does the current version of nvidia-docker should be integrated with docker-compose ?
Sorry if I didn't properly report this as an issue: it is indeed more a lack of documentation and I didn't know where to report it
docker-compose version 1.24.1
Docker version 19.03.2, build 6a30dfc
The text was updated successfully, but these errors were encountered: