Installing CUDA 8.0 + cuDNN 5.1 + TensorFlow with Ubuntu 14.04 (上)
来源:互联网 发布:免费php网站模板 编辑:程序博客网 时间:2024/06/04 19:32
花了一天在Ubuntu 14.04安装CUDA 8.0 + cuDNN 5.1 + TensorFlow,最终成功,记录一下安装过程,方便日后重装。教程大多来自外网,所以就用英文记录,不翻译了。1080 Ti记得在所有步骤走完之后,sudo apt-get update一把,把显卡驱动升级,不然会不识别1080 Ti。
目录:
Installing CUDA 8.0 + cuDNN 5.1 + TensorFlow with Ubuntu 14.04 (上)
Installing CUDA 8.0 + cuDNN 5.1 + TensorFlow with Ubuntu 14.04 (下)
百度云盘链接: https://pan.baidu.com/s/1hsePmWO 密码: 5n1w
Step 1. Installing CUDA 8.0
(1.) Install build essentials.
sudo apt-get install build-essential(2.) Go to https://developer.nvidia.com/cuda-downloads 或者百度云地址 and download CUDA toolkit 8.0 for Ubuntu 14.04.
(3.) Open up a terminal and extract the separate installers via:
mkdir ~/Downloads/nvidia_installers;cd ~/Downloads./cuda_7.5.18_linux.run -extract=~/Downloads/nvidia_installers;(4.) Completely uninstall anything in the ubuntu repositories with nvidia-*. I used synaptic and did a purge, AKA completely uninstall programs and configuration.
sudo apt-get --purge remove nvidia-*(5.) No need to create an xorg.conf file. If you have one, remove it (assuming you have a fresh OS install).
sudo rm /etc/X11/xorg.conf(6.) Create the /etc/modprobe.d/blacklist-nouveau.conf file with the 2 following lines:
blacklist nouveauoptions nouveau modeset=0Then do a
sudo update-initramfs -u(7.) Reboot computer. Nothing should have changed in loading up menu. You should be taken to the login screen. Once there type: Ctrl + Alt + F1, and login to your user. Keep the next commands handy in another machine since now you are in tty.
(8.) In tty:
sudo service lightdm stop
The top line is a necessary step for installing the driver.
(9.) [For Ubuntu 14.04]
sudo sh cuda_8.0.61_375.26_linux.run --no-opengl-libs(10.) Set Environment path variables in .bashrc:
export PATH=/usr/local/cuda-8.0/bin:$PATHexport LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH(11.) Verify the driver version:
cat /proc/driver/nvidia/version(12.) Check CUDA driver version:
nvcc -V(13.) At this point you can switch the lightdm back on again by doing:
sudo service lightdm start.(14.) BOTH 16.04 and 14.04
cd /usr/local/cuda/samples/1_Utilities/deviceQuerysudo make./deviceQuery
if you get something wrong, check if there is some device named "nvidia*" in /dev
ls /dev
if not see "nvidia*", use "
touch nvi.shsudo gedit nvi.sh
add the following :
#!/bin/bash/sbin/modprobe nvidiaif [ "$?" -eq 0 ]; then# Count the number of NVIDIA controllers found.NVDEVS=`lspci | grep -i NVIDIA`N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l`NVGA=`echo "$NVDEVS" | grep "VGA compatible controller" | wc -l`N=`expr $N3D + $NVGA - 1`for i in `seq 0 $N`; domknod -m 666 /dev/nvidia$i c 195 $idonemknod -m 666 /dev/nvidiactl c 195 255elseexit 1fi/sbin/modprobe nvidia-uvmif [ "$?" -eq 0 ]; then# Find out the major device number used by the nvidia-uvm driverD=`grep nvidia-uvm /proc/devices | awk '{print $1}'`mknod -m 666 /dev/nvidia-uvm c $D 0elseexit 1fi
then :
sudo chmod a+x nvi.shsudo ./nvi.shrun ./deviceQuery again.
Something like this should show up
magneto@magneto-dell:/usr/local/cuda/samples/1_Utilities/deviceQuery$ ./deviceQuery./deviceQuery Starting... CUDA Device Query (Runtime API) version (CUDART static linking)Detected 1 CUDA Capable device(s)Device 0: "Quadro M1000M" CUDA Driver Version / Runtime Version 8.0 / 7.5 CUDA Capability Major/Minor version number: 5.0 Total amount of global memory: 2002 MBytes (2099642368 bytes) ( 4) Multiprocessors, (128) CUDA Cores/MP: 512 CUDA Cores GPU Max Clock rate: 1072 MHz (1.07 GHz) Memory Clock rate: 2505 Mhz Memory Bus Width: 128-bit L2 Cache Size: 2097152 bytes Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096) Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers Total amount of constant memory: 65536 bytes Total amount of shared memory per block: 49152 bytes Total number of registers available per block: 65536 Warp size: 32 Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block: 1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535) Maximum memory pitch: 2147483647 bytes Texture alignment: 512 bytes Concurrent copy and kernel execution: Yes with 1 copy engine(s) Run time limit on kernels: No Integrated GPU sharing Host Memory: No Support host page-locked memory mapping: Yes Alignment requirement for Surfaces: Yes Device has ECC support: Disabled Device supports Unified Addressing (UVA): Yes Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0 Compute Mode: < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 7.5, NumDevs = 1, Device0 = Quadro M1000MResult = PASSDone!!
References:
https://www.pugetsystems.com/labs/hpc/NVIDIA-CUDA-with-Ubuntu-16-04-beta-on-a-laptop-if-you-just-cannot-wait-775/
https://devtalk.nvidia.com/default/topic/878117/cuda-setup-and-installation/-solved-titan-x-for-cuda-7-5-login-loop-error-ubuntu-14-04-/
http://askubuntu.com/questions/451672/installing-and-testing-cuda-in-ubuntu-14-04
0 0
- Installing CUDA 8.0 + cuDNN 5.1 + TensorFlow with Ubuntu 14.04 (上)
- Installing CUDA 8.0 + cuDNN 5.1 + TensorFlow with Ubuntu 14.04 (下)
- ziyong Installing CUDA 8.0 and cuDNN 5.1 on Ubuntu 16.04
- Ubuntu 16.04+Gtx1050Ti+cuda 8.0+cudnn 5.1 tensorflow 安装
- Tensorflow 1.2+Ubuntu 16.04+Cuda 8.0+cuDNN 5.1配置流程
- ubuntu 14.04+ gtx 1070+cuda 8.0 + cudnn 5.1+ tensorflow GPU 踩坑实录
- (亲测)服务器 Ubuntu 14.04 安装 CUDA 8.0 + cuDNN 5.1 + tensorflow
- 安装TensorFlow(Ubuntu+CUDA+Cudnn)
- 最新的Tensorflow + CUDA 8.0 +Cudnn 5.1
- Ubuntu 16.04 + cuda-8.0 + cudnn-6.0 + Tensorflow(及其简单)
- CUDA 7.5 & cuDNN v4 & tensorflow on Ubuntu 14.04 LTS
- ubuntu 14.04+ GTX 1070+cuda 8.0 + cudnn 5.1配置一步到位
- Ubuntu 15.04: Compile Caffe with CUDA/cuDNN
- Ubuntu16.04+tensorflow(gpu)+Cuda(8.0)+cudnn(5.1)
- 在UBUNTU 16.04上配置TensorFlow + cuDNN + CUDA深度学习系统(30分钟傻瓜版)
- Tensorflow Cuda 8.0 CuDNN 6.0 Python 3.5
- Ubuntu 16.04安装NVIDIA显卡驱动 、CUDA-8.0、cuDNN和TensorFlow问题及解决方法
- ubuntu 14.04 server搭建+NVIDIA+CUDA+CUDNN+caffe+theano+tensorflow+keras+matlab
- HDU-1075-What Are You Talking About
- android studio 导入外部库文件,以及将项目中module引用依赖
- GYM 101149 C.Mathematical Field of Experiments(水~)
- MFC小总结_1
- 团体程序设计天梯赛-练习集 L3-005. 垃圾箱分布 dijkstra 解题报告
- Installing CUDA 8.0 + cuDNN 5.1 + TensorFlow with Ubuntu 14.04 (上)
- 流媒体-FFmpeg
- hibernate学习笔记第一天(2)
- java自适应响应式 企业网站源码 SSM 生成静态化 手机 平板 PC
- 微信小程序之提高应用速度小技巧
- PLC HandShake 的Data传递为什么用 Work Number
- Java SSM 商户管理系统 客户管理 库存管理 销售报表 项目源码
- linux 日志logger
- java springmvc mybaits maven shiro mysql 后台框架源码bootstrap