New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for nvidia-container-toolkit and docker 19.03 #3143
Comments
the so I second this request, GPUs won't be usable with Portainer otherwise |
Hello! Any news on this? |
any update? |
Are there any plans on implementing this at all? Please let us know - it is a crucial feature and the deprecated nvidia-docker2 is not going to work forever. We might have to look into alternatives. Quote:
(Source: https://github.com/NVIDIA/nvidia-docker) |
Hey there everyone, in response to the interest on this I have this assigned to me as a normal priority task. Once I finish work on my current high priority task this week I will focus on this 👍 |
any news on this? |
This comment has been minimized.
This comment has been minimized.
@RonB I believe the |
@georgechang ok sorry, was just happy that I got it working. And I am definately not an expert. |
Any update? |
How are you guys handling this outside of portainer? |
@ne0ark actually pretty simple, all you have to do is to add the |
Thanks I just got it installed with Nvidia runtime. It’s much better route. |
@ne0ark Do you mean nvidia-docker2? How is it a better route? It works well but it will not be supported in the future. Frankly, I don't understand why there is no option to manually add command line parameters to |
This question on command line parameters has been asked dozens of times.
We are talking to the docker API, not using the cli, so its not as simple as passing a cli flag through; for each cli option you would want to add, we must parse and determine the correct api syntax to send instead.
Thats not trivial.
We wont be adding the ability to specify random cli options anytime soon sorry.
|
Required changesContainer-creation viewIntroduce a new input to support the GPUs option in the Runtime & Resources tab Container-edition viewSupport the same input as the one in the container creation view. Container-details viewIntroduce a new entry in the Container details showing the value associated to GPUs only if it was set when the container was created. |
Implementation plan
The problem will be translating from portainer to docker API. Docker API v1.40+ expects a field called “DeviceRequests” which is an array of objects. Each object has the shape of:
I’m not 100% sure how it needs to be filled. I expect that Options can be an empty object (or nil), caps should stay the same and DeviceIDs can be a list of ids or an array with one slot which is set to “all” or “none”. If that’s the case then we can have a switch that enables this feature (otherwise we send DeviceRequests as an empty array. if enabled the user can switch between a list of device ids, or just all. This is only supported from v1.40, so we should hide it for earlier versions How can we test this? @deviantony @yi-portainer |
Dont forget, we also need to support the use of gpu’s in kube..
|
Feature request for the equivalent in Kubernetes: #4640 |
is there any trick to see gpus on Container-edition view or Container-creation view? |
@estimadarocha we have a work in progress on this via #4791 We're currently reviewing it but if you want to have a look at it you can use the following development/preview image: |
I will try and see how it looks like... Thanks @deviantony |
To everyone following this item, we have a first piece of work available for this via #4791 We'd be happy to get some feedback on it for those of you that can give it a go (this is a development build and should not be used in production environments): |
Hi @bobarune, thanks for the feedback ! I've passed it to our development team via #4791 (comment) and we'll continue working on this. |
Any updates?? I have been fallowing this for quite some time, my plex container stopped working. I had to disable the old nvidia runtime and without gpu support i have to rely on cpu transcoding. |
Hey everyone. Happy to find this work-in-progress version of GPU compatibility. I've recently pivoted the role of my systems into some very render-heavy workfloads and GPU support for my container ecosystem is now a must. The It would be really awesome for this to merge soon so I could have dark mode AND GPU capabilities! |
After a little more testing, I found that the following features don't work at all on this image, even on a totally fresh install of Docker + Portainer:
Hopefully I'm not just pointing out something obvious. |
Hello, everyone |
Closing this issue as this work has been included in our 2.15 release, which will be releasing next week. |
From nvidia-container-toolkit github page:
I can't upgrade to docker 19.03 with the new nvidia-container-toolkit because adding gpus to the container is not supported from the portainer UI with this new toolkit.
With the new nvidia-container-toolkit the way to run containers with gpu access is:
docker run --gpus all nvidia/cuda:9.0-base nvidia-smi
With nvidia-docker2 it used to be:
docker run --runtime=nvidia nvidia/cuda:9.0-base nvidia-smi
which was easy to do from the portainer UI under the "Runtime & Resources" tab.
So the feature request is to support
--gpus
options from the portainer UI with the new nvidia-container-toolkit and docker 19.03.An idea is to have it available under "Runtime & Resources" -> "Resources" tab where you can already configure other resource options.
Here are some examples of using the
--gpus
option taken from the nvidia-container-toolkit github page.Edit: There is a workaround which is listed at the bottom of the nvidia-container-toolkit github page s.t. using
--runtime
option still works. They note that this won't be supported in the future.The text was updated successfully, but these errors were encountered: