Created
February 25, 2016 08:08
-
-
Save wongjingping/35f9bb79f2bd6fa68f1f to your computer and use it in GitHub Desktop.
Instructions for setting up CUDA and NVIDIA drivers for using GPU on CentOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rmb to export http_proxy, https_proxy before anything, and su - root | |
export http_proxy=... | |
export https_proxy=... | |
# update yum and install packages | |
yum update | |
yum install kernel-devel kernel-headers dkms | |
# disable Nouveau, by adding the following line to /etc/modprobe.d/blacklist.conf | |
blacklist nouveau | |
# reboot then set run-level to 3 (no GUI) for us to install NVIDIA driver | |
reboot | |
init 3 | |
# download latest nvidia drivers from http://www.nvidia.com/Download/Find.aspx | |
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/352.79/NVIDIA-Linux-x86_64-352.79.run | |
sh NVIDIA-Linux-x86_64-352.79.run | |
# download and install latest cuda toolkit from https://developer.nvidia.com/cuda-downloads | |
wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda-repo-rhel7-7-5-local-7.5-18.x86_64.rpm | |
rpm -ivh cuda-repo-rhel7-7-5-local-7.5-18.x86_64.rpm | |
# add lines to update PATH and LD_LIBRARY_PATH in .bashrc (edit version numbers as appropriate) | |
export PATH=/usr/local/cuda-7.5/bin:$PATH | |
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH | |
# test out installation | |
nvidia-smi # NVIDIA driver | |
nvcc -V # CUDA Toolkit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment