I followed this guide and seemed to get it working.
https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
However jellyfin transcoding sttill doesn't work. I have tried adding the "nvidia devices= all" environment variable, it still didn't work.
I tried using the docker conpose from here
But when I try and run this command: "docker exec -it jellyfin ldconfig sudo systemctl restart docker"
It says the container is restarting and to try again when the container has started.