您的位置:首页 > 其它

Installation of NVIDIA GPU Driver and CUDA Toolkit

2015-08-30 13:43 405 查看

Installation of NVIDIA GPU Driver and CUDA Toolkit

Disable default driver

modify
/etc/modprobe.d/blacklist.conf
by adding following commond at the end of the file:
blacklist nouveau


modify
/etc/default/grub
file by adding
rdblacklist=nouveau nouveau.modeset=0


Install NVIDIA GPU Driver

type
ctrl+alt+F1
to tty and log in.

shut down lightdm
sudo service lightdm stop


add source
sudo add-apt-repository ppa:xorg-edgers/ppa
,
sudo apt-get update
.

install driver. Note that the version of the driver must be correspondent to the GPU card. One can find the correct version in NVIDIA official website. For example, my GPU is GTX970M, then I should use the following commend:
sudo apt-get install nvidia-352
and
sudo apt-get install nvidia-352-uvm


reboot

Install CUDA Toolkit

download CUDA 7.0 .run file from NVIDIA website. Note that the CUDA version should be correspendent to gcc version and driver version.

change .run file mode by
chmod +x *.run


install CUDA by
sudo ./*.run
. Note to skip the installation of driver.

add necessary environment path by
PATH=/path/to/cuda/bin:$PATH
and
LD_LIBRARY_PATH=/path/to/cuda/lib64:$LD_IBRARY_PATH
and export the paths. Alternatively, one can modify /etc/profile to set the environment paths. Add
export PATH="/path/to/cuda/bin:$PATH"
and in commond line type
source /etc/profile


verify the installation. Change directory to CUDA sample and make the samples. Run a sample
sudo ./deviceQuery
to verify the installation.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  gpu cuda