基于GTX750Ti CUDA环境安装

环境:ubuntu14.04 64bit

安装驱动

从https://www.nvidia.cn/Download/index.aspx?lang=cn下载对应的驱动:

image.png

执行run包提示以下错误:


image.png

先安装gdm工具包:
$sudo apt-get install gdm

然后停止X Server:
$ sudo service gdm stop
gdm stop/waiting
注意这里不能像网上其他人说的那样执行sudo /etc/init.d/gdm stop,这样是不能停止X Server的。

禁止掉nouveau驱动:
$ sudo vim /etc/modprobe.d/blacklist.conf
在最后加入“blacklist nouveau”
重启机器

然后再次执行$ sudo ./NVIDIA-Linux-x86_64-390.59.run

执行完成后,执行以下命令确认驱动安装成功:
$ sudo nvidia-smi
Sun Jun 3 21:39:25 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.59 Driver Version: 390.59 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 750 Ti Off | 00000000:01:00.0 Off | N/A |
| 33% 37C P0 1W / 38W | 0MiB / 4042MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

安装CUDA软件包

$ wget https://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run

安装成功后有如下提示:

Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-7.5
Samples: Installed in /home/hank/Downloads/NVIDIA, but missing recommended libraries

然后修改环境变量:
在/etc/profile文件末尾添加以下两句:

export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

测试:

$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17

你可能感兴趣的:(基于GTX750Ti CUDA环境安装)