#268 Added driver installation and CUDA installation instructions
Closed 3 years ago by ankursinha. Opened 4 years ago by t0xic0der.
fedora-docs/ t0xic0der/quick-docs cuda-install-docs  into  master

file modified
+2
@@ -50,6 +50,8 @@ 

  ** NVIDIA

  *** xref:bumblebee.adoc[NVIDIA Optimus Bumblebee]

  *** xref:how-to-set-nvidia-as-primary-gpu-on-optimus-based-laptops.adoc[How to Set NVIDIA as Primary GPU on Optimus-based Laptops]

+ *** xref:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories.adoc[Installing Proprietary NVIDIA Drivers from RPM Fusion repositories]

+ *** xref:installing-cuda-from-rpm-fusion.adoc[Installing CUDA from RPM Fusion]

  

  * xref:getting-started-with-selinux.adoc[SELinux]

  ** xref:changing-selinux-states-and-modes.adoc[Changing SELinux states and modes]

@@ -0,0 +1,89 @@ 

+ = Installing CUDA from RPM Fusion repositories

+ 

+ include::{partialsdir}/3rdparty-message.adoc[]

+ 

+ == Introduction

+ The objective of this documentation is to explain the process of installing

+ CUDA software to enable support for applications which require it - like GENN,

+ Tensorflow, PyTorch etc. The prerequisite of the guide is to have the

+ proprietary drivers installed from the RPM Fusion first which you can do by

+ following link:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories.adoc[this]

+ documentation.

+ 

+ [NOTE]

+ ====

+ The steps listed here have been verified to be working on Fedora 32

+ Workstation. Please update your installation to include your experiences

+ and any other tweaks that may be needed if you using any other spin of

+ Fedora.

+ ====

+ 

+ [NOTE]

+ ====

+ As there are many guides on the internet with different approaches to install

+ the CUDA software. This documentation aims to provide a much easier way to make

+ the installation happen. As the community cannot ensure the proper functioning

+ of all the said guides on every Fedora release, it is recommended to follow the

+ steps provided in this documentation instead.

+ ====

+ 

+ === Step #1: Download the executable binary from the repository

+ Head to

+ https://github.com/t0xic0der/nvidia-auto-installer-for-fedora/releases[NVAutoInstFedora]

+ release page and download the most recent executable binary. At the time of

+ writing this documentation, the latest release is

+ https://github.com/t0xic0der/nvidia-auto-installer-for-fedora/releases/tag/v0.3.0[v0.3.0].

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-0.png[]

+ 

+ === Step #2: Make the binary executable by changing access permissions

+ Move into the directory where the binary was downloaded.

+ ----

+ cd Downloads/

+ ----

+ Then type in the following command and press ENTER to make the binary

+ executable.

+ ----

+ sudo chmod +x NVAutoInstFedora32

+ ----

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-1.png[]

+ 

+ === Step #3: Check the documentation of the tool

+ Type in the following command and press ENTER to check the documentation of

+ the automatic installer tool.

+ ----

+ sudo ./NVAutoInstFedora32 --help

+ ----

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-6.png[]

+ 

+ === Step #4: Fetch and install the official CUDA repositories

+ There is no need to check the compatibility with the device as a proprietary

+ driver is already installed (therefore it is supported). Type in the following

+ command and press ENTER to install and update the official repositories for

+ CUDA software.

+ ----

+ sudo ./NVAutoInstFedora32 --nvrepo

+ ----

+ 

+ image:installing-cuda-from-rpm-fusion-0.png[]

+ 

+ === Step #5: Download and install the CUDA support software

+ Type in the following command and press ENTER to download and install the CUDA

+ support software. Ensure that you have a good internet connection as the

+ download size is big.

+ ----

+ sudo ./NVAutoInstFedora32 --plcuda

+ ----

+ 

+ image:installing-cuda-from-rpm-fusion-1.png[]

+ 

+ == References

+ Should you face issues while following these steps or if these do not match your use case,

+ feel free to convey your queries on https://ask.fedoraproject.org[Fedora Forums].

+ 

+ Here are the links you can refer to for obtaining more information.

+ 

+ * https://rpmfusion.org/Howto/NVIDIA[RPMFusion's NVIDIA How-to guide]

+ * https://rpmfusion.org/Howto/CUDA[RPM Fusion's CUDA How-to guide] 

\ No newline at end of file

@@ -0,0 +1,125 @@ 

+ = Installing Proprietary NVIDIA Drivers from RPM Fusion Repositories

+ 

+ include::{partialsdir}/3rdparty-message.adoc[]

+ 

+ == Introduction

+ The objective of this documentation is to explain the process of installing

+ proprietary NVIDIA drivers from the RPM Fusion repositories as a replacement

+ to the already-available open-source nouveau drivers for NVIDIA discrete

+ graphic cards. This driver would allow for much better graphical performance

+ throughout specific applications, video players and video games.

+ 

+ [NOTE]

+ ====

+ The steps listed here have been verified to be working on Fedora 32

+ Workstation. Please update your installation to include your experiences and

+ any other tweaks that may be needed if you are using any other spin of Fedora.

+ ====

+ 

+ [NOTE]

+ ====

+ As there are many guides on the internet with different approaches to install

+ the NVIDIA drivers, this documentation aims to provide a much easier way to

+ make the installation happen specifically from the RPM Fusion repositories

+ which are tailor-made for Fedora. As the community cannot ensure the proper

+ functioning of all the said guides on every Fedora release, it is recommended

+ to follow the steps provided in this documentation instead.

+ ====

+ 

+ [NOTE]

+ ====

+ Also, it is highly recommended not to use the RUN file provided by the

+ official NVIDIA website as the binary is distro-agnostic and changes made by

+ it might be irreversible and leave back a lot of residual configurations.

+ ====

+ 

+ [WARNING]

+ ====

+ This guide requires the secure boot to be **turned off** to load up the

+ unsigned NVIDIA kernel modules.

+ ====

+ 

+ === Step #1: Download the executable binary from the repository

+ Head to

+ https://github.com/t0xic0der/nvidia-auto-installer-for-fedora/releases[NVAutoInstFedora]

+ release page and download the most recent executable binary. At the time of

+ writing this documentation, the latest release is

+ https://github.com/t0xic0der/nvidia-auto-installer-for-fedora/releases/tag/v0.3.0[v0.3.0].

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-0.png[]

+ 

+ === Step #2: Make the binary executable by changing access permissions

+ Move into the directory where the binary was downloaded.

+ ----

+ cd Downloads/

+ ----

+ Then type in the following command and press ENTER to make the binary

+ executable.

+ ----

+ sudo chmod +x NVAutoInstFedora32

+ ----

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-1.png[]

+ 

+ === Step #3: Check the documentation of the tool

+ Type in the following command and press ENTER to check the documentation of

+ the automatic installer tool.

+ ----

+ sudo ./NVAutoInstFedora32 --help

+ ----

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-6.png[]

+ 

+ === Step #4: Check if your device is compatible with the drivers

+ Type in the following command and press ENTER to check the compatibility of

+ the device with the drivers.

+ ----

+ sudo ./NVAutoInstFedora32 --compat

+ ----

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-5.png[]

+ 

+ If the compatibility check results turn out positive, your device has one or

+ more supported cards and the proprietary drivers can be installed using the

+ tool. If it comes out otherwise, the device does not have the required

+ specifications and the installation should not be continued.

+ 

+ === Step #5: Fetch and install the RPM Fusion repositories

+ Type in the following command and press ENTER to install and update the

+ RPM Fusion repositories for NVIDIA drivers.

+ ----

+ sudo ./NVAutoInstFedora32 --rpmadd

+ ----

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-2.png[]

+ 

+ === Step #6: Download and install the proprietary NVIDIA drivers

+ Type in the following command and press ENTER to download and install the

+ proprietary NVIDIA drivers.

+ ----

+ sudo ./NVAutoInstFedora32 --driver

+ ----

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-3.png[]

+ 

+ === Step #7: [Optional] Download and install the x86 support libraries

+ Type in the following command and press ENTER to download and install the x86

+ support libraries. While the libraries are optional, the installation is

+ recommended if you use Steam, Lutris, Wine or any other application which could

+ benefit from the given dependencies.

+ ----

+ sudo ./NVAutoInstFedora32 --x86lib

+ ----

+ 

+ image:installing-proprietary-nvidia-drivers-from-rpm-fusion-repositories-4.png[]

+ 

+ === Step #8: Restart your device

+ Reboot your device to load the up the recently installed drivers.

+ 

+ == References

+ Should you face issues while following these steps or if these do not match your use case,

+ feel free to convey your queries on https://ask.fedoraproject.org[Fedora Forums].

+ 

+ Here are the links you can refer to for obtaining more information.

+ 

+ * https://rpmfusion.org/Howto/NVIDIA[RPMFusion's NVIDIA How-to guide]

Checklist:

  • Added "Installing proprietary NVIDIA drivers from RPM Fusion repositories" quick-docs
  • Added "Installing CUDA from RPM Fusion" quick-docs
  • Added all image assets and corrected links to them
  • Added link to the page navigation

Thanks @t0xic0der !

I don't have an nvidia card myself, so I'll have to find someone that does to go over the doc to double-check the steps.

In the meantime, I had a few queries:

  • why is it that the Optimus guide you had worked on uses the Gnome-software way of installing Nvidia drivers, but these two rely on your tool? Would it not be simpler for users/more consistent for them to continue using the Gnome software method?

  • from what I remember, since rpmfusion maintain the nvidia driver and are the points of contact for all bugs and troubleshooting, we didn't want to duplicate RPMFusion's documentation when it comes to the installation of nvidia driver. Would it not be better to add the additional bits about your tool to their documentation, and simply point there from quick-docs? (The other alternative is that we ask rpmfusion to ditch their docs and use quick-docs too, but I haven't spoken to rpmfusion about it and cannot say how well this idea will be received).

  • the last point is the usual one about the use of a particular installer tool---as a community we cannot endorse any particular tool, especially if it isn't in the repos (which means it hasn't formally been reviewed). So, if these docs are to use your tool, we should modify the titles of the docs to say ".... using <name of tool>". That makes it clear that this is one way of going about it but there are other tools/scripts out there too. A note on the lines of "there are multiple installers, and this document deals with this one, but the community does not endorse any particular script", would perhaps be necessary.

So, I think we should split this PR into two:

  • one for CUDA, which requires nvidia drivers to be installed but does not depend on how they are installed;
  • and a second one on installing nvidia drivers from RPMFusion where we could work with rpmfusion to see what the best way forward is.

The first PR regarding CUDA can then proceed independently of the second one while we figure that out.

What do you think?

Hi @ankursinha,

I don't have an nvidia card myself, so I'll have to find someone that does to go over the doc to double-check the steps.

Great. I would look if I could find some too. :)

why is it that the Optimus guide you had worked on uses the Gnome-software way of installing Nvidia drivers, but these two rely on your tool? Would it not be simpler for users/more consistent for them to continue using the Gnome software method?

As you might have noticed in the documentations that I pushed recently, they are much smaller in size and very easier to follow as compared to the Optimus guide which I wrote (which even had phrases which asked the user to be very careful in following the described steps).

The tool simply automates the same process that was used in the Optimus guide such that the user does not need to pop open GNOME Software and pick repositories selectively for updating. We could have the Optimus guide as an extension to the guide recently added about installing NVIDIA drivers from RPM Fusion by adding only the part which are needed to set the discrete GPU as primary.

from what I remember, since rpmfusion maintain the nvidia driver and are the points of contact for all bugs and troubleshooting, we didn't want to duplicate RPMFusion's documentation when it comes to the installation of nvidia driver. Would it not be better to add the additional bits about your tool to their documentation, and simply point there from quick-docs? (The other alternative is that we ask rpmfusion to ditch their docs and use quick-docs too, but I haven't spoken to rpmfusion about it and cannot say how well this idea will be received).

That is indeed true about RPM Fusion being the maintainers and point of contact for everything related to NVIDIA but their documentation and ours are very different, although the goals of both are the same. The docs at RPM Fusion gives a list of commands with technical explanation as to what they would do while the tool simply encapsulates those commands and does it for the user without them knowing the intricacies while still preserving the control over the entire procedure of it. To explain it in a better way, I am indeed using the steps listed at the RPM Fusion documentation in the tool but making it comparatively more convenient. (Simply compare the docs they provide with the said quick doc and you would figure easily which would be easier to follow through :wink:)

We can put a conversation with the folks at RPM Fusion for the same. (Although I think it is less likely that they would drop their documentation for having one in quick-docs but they might rather have the content of quick-docs made available there.)

the last point is the usual one about the use of a particular installer tool---as a community we cannot endorse any particular tool, especially if it isn't in the repos (which means it hasn't formally been reviewed). So, if these docs are to use your tool, we should modify the titles of the docs to say ".... using <name of="" tool="">". That makes it clear that this is one way of going about it but there are other tools/scripts out there too. A note on the lines of "there are multiple installers, and this document deals with this one, but the community does not endorse any particular script", would perhaps be necessary.

I and @lcts are constantly working to make this available in a COPR now though the fact cannot be denied that it really needs a review. We can of course add those lines in the documentation but it would end up pushing people away from this documentation (an actively maintained one) to the RPM Fusion one. Once the COPR takes off, we are planning on phasing out the executable binaries altogether and package this in RPM Fusion Non-free. Of course, this all is a work-in-progress which would take some time but the tool is functional completely from the get-go.

So, I think we should split this PR into two:
- one for CUDA, which requires nvidia drivers to be installed but does not depend on how they are installed;
- and a second one on installing nvidia drivers from RPMFusion where we could work with rpmfusion to see what the best way forward is.

Makes sense to me.

Hi @ankursinha, the tool has now been updated to use the most recent RHEL8 repos for CUDA as opposed to the unmaintained F29 repos which were used previously. I have also checked through the COPR, @lcts has made and it works quite well. The only thing left to do now is to document the installation methods after version bumping the package.

Have we:

  • reached out to rpmfusion?
  • split the doc into two?
  • updated the doc to say "installing using <tool>" (which leaves the door open for other similar tools to also be documented)?

I can take another look next week perhaps, but if someone else wants to do it before, that's fine.

reached out to rpmfusion?

Ummm... No. We do have a COPR but I guess you know that already. Let me reach out to them.

Split the doc into two?

There are indeed two documents (but not how you mentioned because of this). Of course, that would need editing of the Optimus guide - as the installation would happen using the doc provided here while we would keep the PRIME configuration part there. (That would help in making that document significantly smaller, inviting and easier to grasp)

updated the doc to say "installing using <tool>" (which leaves the door open for other similar tools to also be documented)?

Should we? I mean, if we can package this, test it for every release and say, have it on RPMFusion - all we need to specify that this does it.

Should we? I mean, if we can package this, test it for every release and say, have it on RPMFusion - all we need to specify that this does it.

Yes, we should. There can be N tools for the same task (already are, even for Nvidia), and documentation should be done in a way where they can all be documented with equal importance. We cannot imply that there is only one tool that does this task, or that it is the "official" one. (A tool being reviewed does not make it the official tool, it just means it's one tool that does the task and there may be others too. There are many packages in Fedora that do similar things and each has their pros and cons. None of them are the official tool for the task---they're just tools that users can choose from.)

reached out to rpmfusion?

Ummm... No. We do have a COPR but I guess you know that already. Let me reach out to them.

Thanks, irrespective of the outcome of the discussion, it is one that should be had, especially given that the tool relies on RPMFusion packages. If RPMFusion can take it on as their suggested tool for Nvidia installation, that'll be super awesome.

Hi folks, where are we on this PR? Is there something we can do to move this forward or should we close it?

@t0xic0der : what do you think? Have we reached out to RPM Fusion etc. yet?

@ankursinha, the tool mentioned in the proposed documentation is in a different form right now, so much so that the instructions are not relevant. We can close this PR.

Ok, cool. I'll close this now. Cheers!

Pull-Request has been closed by ankursinha

3 years ago