How to install cuda 9.1 on RHEL 7 by rpm packages.

1. set the bios

  1. Machine w530 k1000m
  2. setting of the bios

graphic card: discrete card

optimums for the OS: disabled

2. disable the nux-dextop

# sudo vim /etc/yum.repos.d/nux-dextop.repo

in the script

name=Nux.Ro RPMs for general desktop use

change the  enabled=1 to enabled=0

3. Make sure EPEL repository is enabled.

# wget

# sudo rpm -Uvh epel-release-7*.rpm

4.  Install dependant packages:

# sudo yum -y install kernel-devel kernel-headers

# sudo yum -y install dkms* libvdpau*

5. Disable Nouveau Driver:

# sudo echo -e "\nblacklist nouveau" >> /etc/modprobe.d/blacklist.conf

# su -

# dracut -f /boot/initramfs-rpm -qa kernel --queryformat "%{PROVIDEVERSION}.%{ARCH}\n" | tail -n 1.img rpm -qa kernel --queryformat "%{PROVIDEVERSION}.%{ARCH}\n" | tail -n 1

# vim /etc/default/grub

add the following to the GRUB_CMDLINE_LINUX= line

Rebuild the grub config:

# grub2-mkconfig -o /boot/grub2/grub.cfg

# reboot

Boot into runlevel 3

Press arrow key when you see GRUB. Select (highlight) kernel line to edit and press ‘e’.

Goto linux line with arrow keys, then press end button to get end of line (or move cursor to end of line with arrow keys). Write space and 3, press CTRL+x to boot.

6. install the CUDA

# cd Downloads

# sudo rpm -i cuda-repo-rhel7-9-1-local-9.1.85-1.x86_64.rpm

# sudo yum clean all

# sudo yum install cuda

# cuda-repo-rhel7-9-1-local-cublas-performance-update-1-1.0-1.x86_64.rpm

# sudo yum clean all

# sudo yum install cuda

7. Post-installation Actions

# sudo vim ~/.bashrc

add at the bottom of the document

# added by CUDA-9.1
export PATH=/usr/local/cuda-9.1/bin:$PATH

# sudo reboot

8. copy the samples

# <destination>

9. test CUDA

# cd <destination>/NVIDIA_CUDA-9.1_Samples/1_Utilities/deviceQuery

# make

# ./deviceQuery

10. update the cuda_update_1

# sudo yum update

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.