-
Notifications
You must be signed in to change notification settings - Fork 49
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
AMD GPU passthrough support #109
Comments
I am currently also at the point that I need amd gpu support to move my last service to jailmaker. Can someone explain what is needed to enable gpu support or what you have done for intel and nvidia? I am open to implementing and evaluating the feature on my system. |
Does it work if you manually add --bind=/dev/dri ? e.g : jlmkr create myjail --bind=/dev/dri |
The intel gpu setting does just that |
Jailmaker has intel and nvidia GPU support because these drivers are provided by the TrueNAS SCALE host OS. I think adding support for a dedicated AMD GPU in jailmaker is not trivial, if possible at all without modifying the host OS. Since I have no dedicated GPU in my TrueNAS server I can't investigate this. Feel free to investigate though. @lks-hrsch you could have a look at the python code of |
Isn't AMD support in Truenas Host OS ? lspci -k | grep amdgpu For info, I tried with 5700G APU, adding --bind=/dev/dri seems to give me access to the igpu in jailmaker. edit : to complete root@myjail:~# vainfo |
Yes I think there's a difference between AMD iGPU and dGPU but I'd be happy to be proven wrong. |
I've labeled this issue as invalid and help wanted. I think iGPU is already supported (Intel or AMD). You'd have to set Regarding AMD dedicated GPUs, as far as I know those aren't supported on the SCALE host system and therefore jailmaker can't support them either. Since I don't have an AMD GPU I could use help to confirm this issue is indeed invalid. Either way, I won't be working on a solution for this issue and I recommend to either switch to an nvidia GPU or implement a solution (if possible) and provide a pull request. |
I apologize for not getting back to you sooner, but I can prove that for AMD iGPU it's already working, a dGPU I also currently don't have for testing. |
Hey! I just want to add that that passing the AMD gpu does work, but one needs to also bind |
@maeehart is that a dedicated AMD GPU you're using (which model)? If so then that's good news and we can close this ticket as completed. |
Yes, it is a 6900 xt, i.e., a dedicated AMD GPU. We could still make a PR regarding the AMD support so that one could just ues the GPU by adding a |
Ah yes that's a good idea. Could you provide the PR? |
I can do it during the weekend. I will need to see if I can do something about the permissions. |
Though you didn't specify what your permission issues are; is it fixed if you add: I ask, since I do something similar for CoralTPU passthrough, which looks like:
Though I haven't spent enough time in the land of nspawn to really work out if all of these are necessary/correct lol Edit: This made me want to go look up what "rwm" is vs just "rw", and the "m" means:
|
Please have a look in the jlmkr.py code and search for for |
Any updates on the AMD dGPU support? |
@maeehart are you sure it was the AMD GPU being used (and not the one in the CPU because you also added I have an AMD RX 580 GPU in a test TrueNAS server but couldn't yet get it working in an ubuntu jail. I tried debugging with |
Hey! I am sure that it is the AMD GPU. I have been now running ollama in the jail and confirming that the GPU is running with watching rocm-smi command for some time. However, I have not had the time to do it again so that I could add the proper scrip to this repo and I am sorry about that. I remember that I had to bind both /dev/dri and /dev/fkd and then modify their rights to allow writing to these files (chmod ...). |
Instead of messing with permissions of |
I think that that is a much better idea. |
Reportedly AMD GPU passthrough works:
Adding a dedicated AMD GPU passthrough config option, with corresponding flag for the create command, seems like overkill when a single additional bind mount is enough (especially since AMD GPU passthrough reportedly relies on |
Suggest documenting this more widely, like in primary readme, or revisiting the decision not to include a flag (even if it's simple). I started investigating jailmaker to handle my k3s -> Docker conversion for Truenas scale, and it wasn't clear if AMD GPU passthrough were supported at all until finding this ticket and reading comments. |
Updated the readme! |
Can confirm hardware transcoding for AMD 5700G works. |
It's great to have intel and nvidia support, but I'm missing the AMD option.
Thank you!
The text was updated successfully, but these errors were encountered: