Is there a way to install docker with gpu support?

hi, I am pretty new to fedora.
I have fedora 36 and is seems that Nvidia is not supporting the fedora distribution. I couldn’t find any workarounds, the the nvidia-docker2 package is not in dnf repositories for fedora 36. is there any way I can run docker container with gpu support?
thanks!

Hi @pavel1860 , welcome to the community. Please see the introductory posts in the #start-here if you’ve not had a chance to do yet.

You can install Nvidia drivers from RPM Fusion:

https://rpmfusion.org/Howto/NVIDIA

Fedora is a free/open source software distribution and does not include any proprietary software, which is why the Nvidia drivers are not included and must be installed from RPM Fusion. I don’t know what the “nvidia-docker” package does, but if it’s proprietary, it will not be included in Fedora either.

I’m not aware of what needs to be done to have GPU enabled docker images, unfortunately, so I can’t help with that aspect at the moment.

thanks, but the envidia driver + cuda part I have managed to do, the problem is the Nvidia-docker2 package that enables containers access to GPU and cuda acceleration.

Do you have a link to nvidia-docker2 please?

1 Like

If you don’t specifically need Docker, you can run GPU enabled apps with a container toolbox. These are podman environments.

here is a repository for the tool kit

1 Like

I guess one could install from source etc. As I said, since it requires the proprietary Nvidia driver, it will not be packaged for Fedora Linux. May be included in RPM Fusion if someone takes it on, though.

https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker

interesting, does it have the same functionality as docker? kubernetes, repositories, isolation etc ?

1 Like

podman and Docker are very similar. Most Docker commands work with podman. They both run OCI containers with the runc/crun backend. I generally prefer podman over Docker, personally.

1 Like

thanks, I will check it out.

2 Likes

here is an interesting solution for fixing the problem. by installing it from a centos8 repo.
seems to work

1 Like