TensorFlow GPU版本安装(1):cudn8.0安装
来源:互联网 发布:淘宝开店卖景点门票 编辑:程序博客网 时间:2024/05/16 04:42
一、安装预检测
1.1 检查显卡类型
lspci | grep -i nvidia
03:00.0 3D controller: NVIDIA Corporation GK110BGL [Tesla K40m](rev a1)
查看是否为支持显卡:http://developer.nvidia.com/cuda-gpus
1.2 检查操作系统类型
uname -m && cat /etc/*release
x86_64
NAME="Red Hat Enterprise LinuxServer"
VERSION="7.2 (Maipo)"
1.3 检查gcc版本
gcc –version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
1.4 检测kernel headers anddevelopment packages
uname -r
3.10.0-327.el7.x86_64
RHEL安装:
sudo yum install kernel-devel-$(uname -r)kernel-headers-$(uname -r)
二 、安装
下载地址:http://developer.nvidia.com/cuda-downloads.
2.1 关闭Nouveau drivers
检测该驱动是否在使用:
lsmod | grep nouveau
有输出表示在使用
RHEL中如何屏蔽:
创建 /etc/modprobe.d/blacklist-nouveau.conf 加入如下内容:
blacklist nouveau
options nouveau modeset=0
重新创建kernel initramfs
sudo dracut –force
2.2 设置文本模式
RHEL6和RHEL7的设置有区别,具体参见/etc/inittab文件
RHEL7的设置:
systemctl set-default multi-user.target
reboot
systemctl get-default
multi-user.target
安装:
sudo sh cuda_8.0.61_375.26_linux.run
安装升级补丁:
sudo sh cuda_8.0.61.2_linux.run
2.3 错误解决
ERROR: You appear to be running an Xserver; please exit X before
installing. For further details,please see the section INSTALLING
THE NVIDIA DRIVER in the README availableon the Linux driver
download page at www.nvidia.com.
So make sure you're killing X via stoppinglightdm (try gdm too, just to be sure) before the CUDA 5.0 test:
`sudo service lightdm stop`
`sudo service gdm stop`
Then try the test again. If it stillmentions the X file, see if you have X running with:
`ps aux | grep X`
This might shed some insight.
If X is not running, delete the lockfile(s)
`sudo rm /tmp/.X*-lock`
三、安装后验证
3.1 环境设置
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
3.2 测试程序
服务器未安装g++需要先安装:
yum install gcc-c++.x86_64
打开~/NVIDIA_CUDA-8.0_Samples,执行make
编译成功,会在/root /NVIDIA_CUDA-8.0_Samples/bin/x86_64/linux/release中找到编译完的程序:
如执行./deviceQuery
会输出相应信息
四、卸载
卸载CudA
sudo /usr/local/cuda-8.0/bin/uninstall_cuda_8.0.pl
卸载NVIDIA驱动
sudo /usr/bin/nvidia-uninstall
去除对于Nouveau驱动的屏蔽,重新生成kernel initramfs/initrd
- TensorFlow GPU版本安装(1):cudn8.0安装
- ubuntu16.04安装+cuda8.0+cudnn5.1+MXNET gpu版本安装+tensorflow gpu版本安装+chainerGPU版本安装
- Win10下安装TensorFlow(GPU版本)
- tensorflow(1):Windows 10安装(GPU版本)
- Win10 安装Tensorflow-GPU版本
- Windows10安装TensorFlow GPU版本
- Windows10安装TensorFlow-GPU版本
- TensorFlow GPU版本安装(3):Anoconda版本安装
- TensorFlow GPU版本安装(2):cudnn安装
- Ubuntu ,anaconda安装tensorflow最新GPU-1.0.0版本
- Tensorflow + Caffe + Torch 的详细安装指南(GPU版本)
- Ubuntu 16.04安装配置TensorFlow GPU版本
- Win10下安装GPU版本的tensorflow
- win7 64位 安装tensorflow GPU版本
- Anaconda Tensorflow GPU 版本的安装问题
- ubuntu 16.04 安装TensorFlow GPU版本
- Ubuntu16.04+Anaconda 安装GPU版本tensorflow
- 安装tensorflow gpu enable python 2.7 版本
- HDU
- python脚本打包exe可执行文件
- 云虚拟主机使用教程
- Oracle字符串分割Split
- 在MATLAB上使用GIT代码管理器
- TensorFlow GPU版本安装(1):cudn8.0安装
- JavaScript 中 2个json拼接合成一个新的json
- PHP源码分析-数组
- Java小知识整理
- 正态分布中一些值得注意的量
- C#串口通信助手
- JAVA类加载机制与反射,动态代理Proxy串联分析与应用
- JSP中datagrid的列表
- npm更新模块并同步到package.json中