Installing NVIDIA Drivers on CentOS

For those who have every tried to get NVIDIA or AMD Drivers working in Linux, know that its a complete pain to do.  Hopefully this guide will clear things up a bit.

I have a base system with a Gigabyte Xeon D Motherboard along with a Gigabyte NVIDIA 1070 Card for us in ZCash Mining.  My first step was to install CentOS 7.  I chose to use the Net Install ISO “burned” to a thumb drive, which I then booted from and installed the OS.  Be sure to run an update and reboot before starting the below directions.

Next I download NVIDIA-Linux-x86_64-375.66.run from the Nvidia Website and copied it to my Linux Server.

First install the prerequisites for the Drivers

yum install gcc kernel-devel kernel-headers make vim wget

Be sure to now reboot so that the new kernel and headers take hold.  If you don’t you will get errors that the headers and or sources can’t be found.

After the reboot, lets install the EPEL Repository in order to install DKMS

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
rpm -ivh epel-release-7-9.noarch.rpm

yum install dkms

Then I ran to install the NVIDIA Drivers

./NVIDIA-Linux-x86_64-375.66.run –dkms -s

With the -s flag, the installer will run silent and we won’t see the screens below.

Capture.PNG

If you use the -s option this is the output you will see.

Capture

Create a blacklist file for the Nouveau Driver

vim /etc/modprobe.d/blacklist-nouveau.conf

Add the following text

blacklist nouveau

options nouveau modeset=0

Run the following command and reboot the computer

dracut –force

Now run nvidia-smi to verify CUDA capable devices are seen

Capture

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s