Gpu passthough in different containers

I’m running a multi-service media server on a custom built pc using docker to run the servers. Its running the latest version of Ubuntu Server and the most updated version of docker.

ASRock B660M-ITX

Intel® Core™ i9-12900

ASUS Dual NVIDIA GeForce RTX 3060 V2 OC Edition 12GB GDDR6

32GB Single DDR4 3200

1 TB WD nvme drive for os

One container is running Plex and the other container is running Jellyfin. the biggest issue is I can’t get the containers to have access the the GPU. I know the yaml file for each container must be built(for lack of a better word)properly for the container to see the gpu and utilize it. I have read numerous articles about this issue and none of the can get my issue resolved. Not sure if posting the actual yaml file will help but will be done if needed. Anyone that can help out would be greatly appreciated

Thank you

To avoid users searching for and sharing every single link that was already shared in other general topics, can you please share more about how you tried to configure the GPU? What did you install on the host, how you configured containers (gpu-related parameters) Also if you can share the error logs or anything that made you come to the conclusion of having GPU-related issues, we can hopefully recognize faster what the problem could be.

my apologies its was getting late last night and I was getting irritated and frustrated. I have been reading and trouble shooting this issue for over and month and haven’t had any head way. Some of these articles that I have used were intended only for plex and some only for jellyfin and some both.

one article and post I have read talk about installing an nvidia tool kit yet none of the terminal commands that I use work. They all return an error saying the package doesn’t exist. Article dealing with jellyfin and plex recommended this.

another article talked about adding a section in the yaml file that linked the container to the /dev/dri directory on my computer but it also talked about modifying ownership but wasn’t very clear about what ownership needed to be changed. Tried this on both plex and jellying

another article was a walk though about adding an nvidia docker container that you could link other containers too but I could never get the container to work. About 2/3 of the way though this article the commands stop working. At the end the article wants a device section added to the yaml file. I could get that in there and plex and jellyfin could now see the GPU but would not hardware trans-code. Plex reverts to using the CPU instead of the GPU and jellyfin just crashes upon playback. This one I was very hesitant to keep trying. I"m very leary of punching in random commands into the terminal not fully understanding what it is I"m typing in.

the last article added a number of lines to the yaml file that I could not understand in any way

I don’t think I have a GPU issue I can use the nvidia-smi commant and see my GPU. I can change settings for the gpu in the terminal but some some reason I can’t get these docker containers to utilize the gpu