在ubuntu16.04 上安装NVIDIA driver, cuda cudnn。显卡为GTX 750ti,Tesla K40c
1. 安装的为cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb
2.步骤:
2.1
sudo apt-get purge nvidia*
2.2
sudo dpkg -i cuda-repo-<distro>_<version>_<architecture>.deb
sudo apt-get update
sudo apt-get install cuda
2.3 POST-INSTALLATION ACTIONS(后续工作)
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
对于64位系统
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
2.4 安装完成后
移动samples
cuda-install-samples-8.0.sh <dir>
重启后,检查drivers的版本:
cat /proc/driver/nvidia/version
或者
nvcc -V
nvidia-smi
2.5 对于在 ~/NVIDIA_CUDA-8.0_Samples 运行 deviceQuery 没搞明白
3. 安装成功后,各个测试结果
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
$ nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.39 Driver Version: 375.39 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K40c Off | 0000:01:00.0 Off | 0 |
| 23% 42C P8 22W / 235W | 0MiB / 11439MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 750 Ti Off | 0000:03:00.0 On | N/A |
| 33% 33C P8 1W / 38W | 269MiB / 978MiB | 1% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 1 985 G /usr/lib/xorg/Xorg 169MiB |
| 1 1651 G compiz 91MiB |
| 1 2171 G fcitx-qimpanel 5MiB |
| 1 3024 G /usr/lib/firefox/firefox 1MiB |
+-----------------------------------------------------------------------------+
4.存在的问题。
每次启动后,nvcc -V就不执行了。出现
wgb@wgb:~$ nvcc -v
The program 'nvcc' is currently not installed. You can install it by typing:
sudo apt install nvidia-cuda-toolkit
需要重新输入路径才能解决。最终解决办法,还不知!