深度学习主机环境配置2---显卡配置:ubuntu-16.04.2-desktop-amd64.iso + GTX1070TI
2017-12-26 00:11
411 查看
1、ubuntu-16.04.2-desktop-amd64.iso + GTX1070TI下载对应的驱动
cuda官网:https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal
cuda_9.1.85_387.26_linux: https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux
(或者:https://developer.nvidia.com/cuda-toolkit-archive)
2、禁止集成显卡nouveau驱动
$sudo gedit /etc/modprobe.d/blacklist.conf
然后在文本最后添加:(禁用nouveau第三方驱动,之后也不需要改回来)
blacklist
nouveau
options
nouveau modeset=0
sudo
update-initramfs -u
3、重启后,执行:
4、禁用X-Window服务
sudo
service lightdm stop
5、按
6、执行(如果是桌面版本,为了兼容性不黑屏,千万不要安装OpenGL)
sudo
chmod +x cuda_9.1.85_387.26_linux.run
sudo
./cuda_9.1.85_387.26_linux.run
7、配置环境变量:
按照图片指示配置环境变量
vim ./.bashrc
最后一行添加:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-9.0/lib64
bash
8 测试:
nvidia-smi
cat
/proc/driver/nvidia/version
NVRM
version: NVIDIA UNIX x86_64 Kernel Module 384.81 Sat Sep 2 02:43:11 PDT 2017
GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
#编译并测试设备
deviceQuery:cd
/usr/local/cuda-9.0/samples/1_Utilities/deviceQuery
sudo
make
./deviceQuery
cuDNN安装:
解压缩cuDNN软件包。
将以下文件复制到CUDA Toolkit目录中。
9、启动桌面:
sudo
service lightdm start
(注意:由于本人是用的GTX1070TI,是2017年下半年出的,所以cuda8支持支持并不友好,所以选择最新的cuda9.1,
且经过多次测试,ubuntu-16.04.2-desktop-amd64.iso支持GTX1070TI较好,故选择,具体情况因人而异)
-----------------
Do you accept the previously read EULA?
accept/decline/quit: accept
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
(y)es/(n)o/(q)uit: y
Do you want to install the OpenGL libraries?
(y)es/(n)o/(q)uit [ default is yes ]: n
Do you want to run nvidia-xconfig?
This will update the system X configuration file so that the NVIDIA X driver
is used. The pre-existing X configuration file will be backed up.
This option should not be used on systems that require a custom
X configuration, such as systems with multiple GPU vendors.
(y)es/(n)o/(q)uit [ default is no ]:
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 /root ]:
Installing the NVIDIA display driver...
Installing the CUDA Toolkit in /usr/local/cuda-9.0 ...
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
Installing the CUDA Samples in /root ...
Copying samples to /root/NVIDIA_CUDA-9.0_Samples now...
Finished copying samples.
===========
= Summary =
===========
Driver: Installed
Toolkit: Installed in /usr/local/cuda-9.0
Samples: Installed in /root, but missing recommended libraries
Please make sure that
- PATH includes /usr/local/cuda-9.0/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-9.0/lib64, or, add /usr/local/cuda-9.0/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.0/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-9.0/doc/pdf for detailed information on setting up CUDA.
Logfile is /tmp/cuda_install_2882.log
root@kindasusenne:~#
cuda官网:https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal
cuda_9.1.85_387.26_linux: https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux
(或者:https://developer.nvidia.com/cuda-toolkit-archive)
2、禁止集成显卡nouveau驱动
$sudo gedit /etc/modprobe.d/blacklist.conf
然后在文本最后添加:(禁用nouveau第三方驱动,之后也不需要改回来)
blacklist
nouveau
options
nouveau modeset=0
sudo
update-initramfs -u
3、重启后,执行:
lsmod | grep nouveau。如果没有屏幕输出,说明禁用nouveau成功
4、禁用X-Window服务
sudo
service lightdm stop
5、按
Ctrl-Alt+F1进入命令行界面,输入用户名root和密码登录
6、执行(如果是桌面版本,为了兼容性不黑屏,千万不要安装OpenGL)
sudo
chmod +x cuda_9.1.85_387.26_linux.run
sudo
./cuda_9.1.85_387.26_linux.run
7、配置环境变量:
按照图片指示配置环境变量
vim ./.bashrc
最后一行添加:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-9.0/lib64
bash
8 测试:
nvidia-smi
cat
/proc/driver/nvidia/version
NVRM
version: NVIDIA UNIX x86_64 Kernel Module 384.81 Sat Sep 2 02:43:11 PDT 2017
GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
#编译并测试设备
deviceQuery:cd
/usr/local/cuda-9.0/samples/1_Utilities/deviceQuery
sudo
make
./deviceQuery
cuDNN安装:
解压缩cuDNN软件包。
$ tar -xzvf cudnn-9.0-linux-x64-v7.tgz
将以下文件复制到CUDA Toolkit目录中。
$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include $ sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64 $ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
9、启动桌面:
sudo
service lightdm start
(注意:由于本人是用的GTX1070TI,是2017年下半年出的,所以cuda8支持支持并不友好,所以选择最新的cuda9.1,
且经过多次测试,ubuntu-16.04.2-desktop-amd64.iso支持GTX1070TI较好,故选择,具体情况因人而异)
-----------------
Do you accept the previously read EULA?
accept/decline/quit: accept
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
(y)es/(n)o/(q)uit: y
Do you want to install the OpenGL libraries?
(y)es/(n)o/(q)uit [ default is yes ]: n
Do you want to run nvidia-xconfig?
This will update the system X configuration file so that the NVIDIA X driver
is used. The pre-existing X configuration file will be backed up.
This option should not be used on systems that require a custom
X configuration, such as systems with multiple GPU vendors.
(y)es/(n)o/(q)uit [ default is no ]:
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 /root ]:
Installing the NVIDIA display driver...
Installing the CUDA Toolkit in /usr/local/cuda-9.0 ...
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
Installing the CUDA Samples in /root ...
Copying samples to /root/NVIDIA_CUDA-9.0_Samples now...
Finished copying samples.
===========
= Summary =
===========
Driver: Installed
Toolkit: Installed in /usr/local/cuda-9.0
Samples: Installed in /root, but missing recommended libraries
Please make sure that
- PATH includes /usr/local/cuda-9.0/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-9.0/lib64, or, add /usr/local/cuda-9.0/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.0/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-9.0/doc/pdf for detailed information on setting up CUDA.
Logfile is /tmp/cuda_install_2882.log
root@kindasusenne:~#
相关文章推荐
- 深度学习主机环境配置1---系统快速配置:ubuntu-16.04.2-desktop-amd64.iso
- 深度学习主机环境配置: Ubuntu16.04+Nvidia GTX 1080/980ti+CUDA8.0
- 深度学习主机环境配置: Ubuntu16.04+Nvidia GTX 1080+CUDA8.0
- 深度学习主机环境配置: Ubuntu16.04+Nvidia GTX 1080+CUDA8.0
- 深度学习主机环境配置: Ubuntu16.04+GeForce GTX 1080+TensorFlow
- 深度学习主机环境配置: Ubuntu16.04 + GeForce GTX 1070
- 深度学习主机环境配置: Ubuntu16.04 + GeForce GTX 1070 + CUDA8.0 + cuDNN5.1 + TensorFlow
- 深度学习主机环境配置: Ubuntu16.04+GeForce GTX 1080+TensorFlow
- ubuntu16.04+双显卡驱动+cuda9.1+cudnn7.05深度学习环境配置
- 深度学习主机环境配置: Ubuntu16.04+GeForce GTX 1080+TensorFlow
- 深度学习主机环境配置: Ubuntu16.04+GeForce GTX 1080+TensorFlow
- (转)深度学习主机环境配置: Ubuntu16.04+Nvidia GTX 1080+CUDA8.0
- 深度学习主机环境配置: Ubuntu16.04+Nvidia GTX 1080+CUDA8.0
- 深度学习主机环境配置: Ubuntu16.04 + GeForce GTX 1070 + CUDA8.0 + cuDNN5.1 + TensorFlow
- 深度学习环境安装和设置 - Ubuntu 16.04.2 + GTX1080Ti (版本382.22)+ CUDA 8.0.61 + cuDNN 6.0 + OpenCV 3.2 + Caffe
- Ubuntu深度学习环境sklearn配置
- ubuntu 16.04 下配置深度学习环境之OpenCV的安装
- Ubuntu16.04+GTX1050+CUDA8.0配置深度学习环境
- 深度学习笔记1 ——Ubuntu16.04下caffe环境的配置(仅CPU)
- 深度学习环境配置:ubuntu16.04 + cuda8.0 + cudnn5.1