feat: Add CDI device support#762
Conversation
|
Edit: Rewrote my whole answer Thanks for the PR! I looked at the implementation and the I will see, whether we can have a quick fix for this, or whether the code from your PR needs to be merged |
|
Hey @jdon sorry for the long pause. I want to merge this PR as part of the next major ( (In addition to this PR I will fix the |
|
Hey @Junkern, Thanks for the ping here, I dropped the ball on this, I've just been using a fork locally for my needs 😂. It would be great to get this merged! I've just fixed up the conflicts. Please let me know what changes you would like and I'm more than happy to make them.
What are your plans for this? Are you planning on removing (Also feel free to push commits to this branch if that's quicker / easier for you!) |
No, I will just improve it, so that it properly works (with all the options listed in https://docs.docker.com/reference/cli/docker/container/run/#gpus) |
Junkern
left a comment
There was a problem hiding this comment.
Thank you! Will become part of a new 4.0.0-beta3 release in the next days and then after some testing the final release will come.
Failing test has nothing to do with your changes, just some hickups with pulling images from dockerhub (fixing this is on my list)
This PR allows users to use the CDI interface to pass through GPUs to their containers instead of using the existing
gpus = "all".This is needed as operating systems like nixos are removing the support for
gpus all.I wasn't sure what the best interface for this would be so I ended up just copying the devices interface from docker compose . Please let me know if you think there is a better way to support this use case.
This is my first PR to this repo, so I've done something wrong or missed something please let me know 🙏
Changes: