-
Notifications
You must be signed in to change notification settings - Fork 2k
Fedora installation procedure #706
Comments
I'm tackling nvidia-docker2. Things that didn't work me |
+1 Fedora 27 user similarly stuck and looking for instructions |
@escorciav Thanks for volunteering. |
@flx42, Error in Fedora 27 due to using repo from Centos 7:
The
|
Hi @flx42,
Update (April 20 after using solution below) |
Did you also try doing directly |
where are those files? |
Look at what's suggested here: #635 (comment) |
update: Oct 24 2018 Please follow the strategy suggested here for Fedora 26, maybe it also works in newer versions. Original message Apparently, it works. Thanks! The alternative that worked for me case was:
Notes:
|
@escorciav Thanks a lot! However I encountered a weird error when doing "sudo docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi"
I think i've been in seccomp mode |
sorry, I was attending an important issue. I forgot to mention the version of docker that I used. Also, note that I installed ( Other than that, I don't know how to help you. |
@andys0975 try to update packages - I had the same issue. (Updated @escorciav manual) Clone the repos as follows (executed as root)
Install rpm files manually
|
I didn't install nvidia-docker2 package. Because I used device mapper with direct lvm. So I modified docker-ce-18.06.0.ce-3.el7.x86_64
nvidia-container-runtime-hook-1.4.0-1.x86_64
libnvidia-container-tools-1.0.0-0.1.rc.2.x86_64
nvidia-container-runtime-2.0.0-1.docker18.06.0.x86_64
libnvidia-container1-1.0.0-0.1.rc.2.x86_64
{
"storage-driver": "devicemapper",
"storage-opts": [
"dm.thinpooldev=/dev/mapper/docker-thinpool",
"dm.basesize=100G",
"dm.use_deferred_removal=true",
"dm.use_deferred_deletion=true"
],
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
|
I did the procedure from #553 (comment)
|
For people searching, procedure #553 (comment) works even in Fedora 34 with just a few more steps. First make sure that you have installed both the nvidia drivers and cuda on your host system (install them from RPM Fusion). After executing the commands in the linked comment you have to edit Leaving out the privileged mode probably will lead you to "Unknown error" or logs complaining that the are missing libraries and a not working container. |
Here's what I just did based on @rickycorte 's instructions and #553 (comment) to get nvidia-docker working with Fedora 34:
Use
edit
|
For Fedora Workstation 36:
|
What I did for Fedora Workstation 36: Uninstalled and reinstalled Nvidia Driver through Gnome Software and it worked. then
|
Since instructions are spread all over the place, here's all the commands I ran on Fedora 36:
Don't copy-paste commands into your terminal blindly, especially not with sudo involved! Double check all URL:s that they point to the correct servers, or even better copy them from the official instructions instead of trusting strangers on github. |
@JohanAR just a note: You should be able to use
{
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
}
} Note that when using
|
@elezar using GPU in docker suddenly stopped working yesterday after updating packages (included both some stuff from official docker repos and nvidia-firmwares from fedora repos, but I don't know exactly what caused it). So I thought I'd try uninstalling from docker-ce repo and try using moby-engine instead. Now I'm getting Seems like it's only when I try to run nvidia-smi in the nvidia/cuda container.. I could run my stable diffusion webui just fine, but I don't know if that has anything to do with that image being created yesterday before these problems started.. |
@JohanAR please create a new ticket against https://github.com/NVIDIA/nvidia-container-toolkit with details of your setup (including installed versions of the |
Had the same issue after an update, pretty sure it came from the official Fedora repo, but I wouldn't know which package. As a work around I set the default runtime to nvidia in /etc/docker/daemon.json and commented out the "runtime" argument in my docker-compose files. That seems to do it for now, but I would like to get back to explicitly declaring the runtime per service. |
Oh, nope, nevermind, setting the default runtime to nvidia did not work. It seemed to after
From what I recall I'd used essentially the same setup that @JohanAR described 5 days ago (above), however, I didn't have moby installed beforehand. Been operating that way since moving from Fedora 34 to 35 about 6 months ago-ish. |
Aha! Found these in my dnf history from 4 days ago:
I removed the 1.11 version and nvidia-docker2, installed the 1.10 version, reinstalled nvidia-docker2. And it works as it did before now. |
@PriamX it seems as if there may be a regression in our Would you be able to reproduce the failures with debug logging enabled (uncomment the Update: I see that you have already created NVIDIA/nvidia-container-toolkit#34 let's continue the discussion there. |
|
@airtonix no idea since I'm still using Fedora 36. However everything started working again after a couple of months, though I don't know exactly which package version that fixed it. |
@airtonix for recent rpm-based distributions the first step is to install the centos8 packages. Then, our stack has changed quite a bit since the original post, and we no longer recommend that users install nvidia-docker2. Instead, our docs recommend (or should if they have not yet been updated) installing the nvidia-container-toolkit package and using the nvidia-ctk runtime configure command to apply the necessary configuration changes to the container engine such as docker. Running sudo nvidia-ctk runtime configure --runtime docker --config /etc/docker/daemon.json Will update the config to include the nvidia runtime. Restarting the docker daemon is still required to update the config. Note there should be no technical reason for the stack to not work on newer fedora distributions. |
What I did for Fedora Workstation 38:
Test:
|
Given that there is no direct support for Fedora.
Can we put a precise guide here? The idea is to make nvidia-docker works in Fedora.
I volunteer to try out previous approaches in my system, Fedora 27. I installed very recently and it's almost brand new.
The text was updated successfully, but these errors were encountered: