ABSTRACT
descripe :
date : 2018.06.06
platform : NVIDIA GeForce 1080Ti
version : ubuntu - 16.04 LTS(自带的是python3.5,所以在安装tensorflow时,需要注意版本)
NVIDIA-driver - 384.13
CUDA - 9.0
cuDNN - 7.1.2
tensorflow - 1.8
==========================
首先在search your computer中输入upd,进入software&updates,更改下载源(推荐清华或阿里作为下载源。)
首先sudo apt update,然后sudo apt upgrade
下载synaptic (新立得 ——————1款好用的软件包管理器)
==========================
STEP 1 : install nvidia driver
reference : https://blog.csdn.net/u012759136/article/details/53355781
修改驱动文件权限
sudo chmod 777 NVIDIA-Linux-x86_64-410.78.run
1. sudo apt-get remove –purge nvidia*
2. sudo vim /etc/modprobe.d/blacklist.conf (sudo apt-get install vim-gtk)
3. add "blacklist nouveau" at the end of file
4. sudo update-initramfs -u
5. sudo reboot
6. Ctrl+Alt+F1
7. lsmod | grep nouveau
8. sudo /etc/init.d/lightdm stop
9. cd ${nvidia_driver_path}
10. sudo sh NVIDIA-Linux-x86_64-384.130.run –no-x-check –no-nouveau-check –no-opengl-files
安装(注意 参数)
sudo ./NVIDIA-Linux-x86_64-384.13.run –no-opengl-files
–no-opengl-files 只安装驱动文件,不安装OpenGL文件。这个参数最重要
–no-x-check 安装驱动时不检查X服务
–no-nouveau-check 安装驱动时不检查nouveau
后面两个参数可不加。
在安装驱动的时候,有一步问你”Would you like to run the nvidia-xconfig utility to automatically update your X configuration file…”什么的,选择 No
11. sudo reboot
Please run the commands, if the desktop can not login after reboot.
1. cd /usr/share/X11/xorg.conf.d/
2. sudo mv nvidia-drm-outputclass.conf nvidia-drm-outputclass.conf.bak
3. sudo reboot
==========================
STEP 2: install CUDA
1. Download CUDA 9.0 at https://developer.nvidia.com/cuda-90-download-archive
select Linux, x86_64, Ubuntu, 16.04, runfile(local) and download base installer,(the download file name is "cuda_9.0.176_384.81_linux.run")
2. cd ${cuda_9.0_path}
3. sudo sh cuda_9.0.176_384.81_linux.run
sudo sh cuda_9.0.176.1_linux.run --override
~~~~~~~~~~~~~~~
Error: unsupported compiler: 7.3.0. Use --override to override this check.
Missing recommended library: libGLU.so
Missing recommended library: libX11.so
Missing recommended library: libXi.so
Missing recommended library: libXmu.so
Missing recommended library: libGL.so
Error: cannot find Toolkit in /usr/local/cuda-9.0
===========
= Summary =
===========
Driver: Not Selected
Toolkit: Installation Failed. Using unsupported Compiler.
Samples: Cannot find Toolkit in /usr/local/cuda-9.0
4. enter n, y, '\n', y, y, '\n' step by step, like this. ('\n' means enter)
有一个关键是会让你选择是否安装Graphics Driver for Linux-x86_64:XXXX版本,这个地方必须选择no!否则会覆盖之前的驱动。
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
(y)es/(n)o/(q)uit: n
Install the CUDA 9.0 Toolkit?
(y)es/(n)o/(q)uit: y
Enter Toolkit Location
[ default is /usr/local/cuda-9.0 ]:
Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: y
Install the CUDA 9.0 Samples?
(y)es/(n)o/(q)uit: y
Enter CUDA Samples Location
[ default is /home/ai_group ]:
Installing the CUDA Toolkit in /usr/local/cuda-9.0 ...
Missing recommended library: libGLU.so
Missing recommende