Ubuntu 14.04+cuda 7.5+caffe安装配置
sudo apt-get install python-pip python-dev
sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp34-cp34m-linux_x86_64.whl
sudo apt-get install python3-numpy swig python3-dev python3-wheel
sudo apt-get install python3-pip
pip install moviepy
Driver: Installed
Toolkit: Installed in /usr/local/cuda-8.0
Samples: Installed in /home/caocao, but missing recommended libraries
Please make sure that
- PATH includes /usr/local/cuda-8.0/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64, or, add /usr/local/cuda-8.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-8.0/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-8.0/doc/pdf for detailed information on setting up CUDA
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
(dGPU), the --no-opengl-libs option must be used. Otherwise, the openGL library used
by the graphics driver of the iGPU will be overwritten and the GUI will not work. In
addition, the xorg.conf update at the end of the installation must be declined.)
cd到cuda sample的路径
--参考
1,http://blog.csdn.net/menglongbor/article/details/7015380 2,http://www.linuxdiyf.com/bbs/viewthread.php?tid=194013 3,http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html 4,http://blog.163.com/thinki_cao/blog/static/83944875201303125444265/
./get_mnist.sh
2.重建LDB文件
./create_mnist.sh
./train_lenet.sh
015.10.23更新:修改了一些地方,身边很多人按这个流程安装,完全可以安装
折腾了两个星期的caffe,windows和ubuntu下都安装成功了。其中windows的安装配置参考官网推荐的那个blog,后来发现那个版本的caffe太老,和现在的不兼容,一些关键字都不一样,果断回到Linux下。这里记录一下我的安装配置流程。
电脑配置:
ubuntu 14.04 64bit
8G 内存
GTX650显卡
软件版本:
CUDA 7.0
caffe 当天从github下载的版本
安装ubuntu的过程省略,建议安装后关闭自动更新,上一次安装caffe后用的很好,结果有一天晚上没关电脑,自己半夜更新了显卡驱动,然后...
caffe的安装流程主要参考这个blog,稍有改动:Caffe + Ubuntu 14.04 64bit + CUDA 6.5 配置说明
Caffe 安装配置步骤:
1, 安装开发所需的依赖包
- sudo apt-get install build-essential # basic requirement
- sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler #required by caffe
Before install CUDA 7.5, you need update gcc 4.8+ to gcc 4.9+
reference:update gcc/g++
2,安装CUDA 7.5
验证过程省略,按照官方文档自己操作吧(遇到问题首先要看官方文档啊,血泪教训)
安装CUDA有两种方法,
离线.run安装:从官网下载对应版本的.run安装包安装,安装过程挺复杂,尝试过几次没成功,遂放弃。
在离线.deb安装:deb安装分离线和在线,我都尝试过都安装成功了,官网下载地址
安装之前请先进行md5校验,确保下载的安装包完整
- sudo dpkg -i cuda-repo-<distro>_<version>_<architecture>.deb
- sudo apt-get update
- sudo apt-get install cuda
- tar -zxvf cudnn-7.5-linux-x64-v5.0-ga.tgz
- cd cuda
- sudo cp lib64/lib* /usr/local/cuda/lib64/
- sudo cp include/cudnn.h /usr/local/cuda/include/
sudo chmod +r libcudnn.so.5.0.5
sudo ln -sf libcudnn.so.5.0.5 libcudnn.so.5
sudo ln -sf libcudnn.so.5 libcudnn.so
sudo ldconfig
- PATH=/usr/local/cuda/bin:$PATH
- export PATH
- source /etc/profile
- /usr/local/cuda/lib64
- sudo ldconfig
- sudo make all -j4
- ./deviceQuery
- ./deviceQuery Starting...
- CUDA Device Query (Runtime API) version (CUDART static linking)
- Detected 1 CUDA Capable device(s)
- Device 0: "GeForce GTX 670"
- CUDA Driver Version / Runtime Version 6.5 / 6.5
- CUDA Capability Major/Minor version number: 3.0
- Total amount of global memory: 4095 MBytes (4294246400 bytes)
- ( 7) Multiprocessors, (192) CUDA Cores/MP: 1344 CUDA Cores
- GPU Clock rate: 1098 MHz (1.10 GHz)
- Memory Clock rate: 3105 Mhz
- Memory Bus Width: 256-bit
- L2 Cache Size: 524288 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: Yes
- 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 Bus ID / PCI location ID: 1 / 0
- Compute Mode:
- < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
- deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 6.5, NumDevs = 1, Device0 = GeForce GTX 670
- Result = PASS
- sudo apt-get install libatlas-base-dev
- sh sudo ./opencv2_4_10.sh
8,安装Caffe所需要的Python环境
切换到文件所在目录,执行
- bash Anaconda-2.3.0-Linux-x86_64.s<em>h</em>
- /home/username/anaconda/lib
- export LD_LIBRARY_PATH="/home/username/anaconda/lib:$LD_LIBRARY_PATH"
9,安装python依赖库
去caffe的github下载caffe源码包
进入caffe-master下的python目录
- for req in $(cat requirements.txt); do pip install $req; done
- cp Makefile.config.example Makefile.config
- ## Refer to http://caffe.berkeleyvision.org/installation.html
- # Contributions simplifying and improving our build system are welcome!
- # cuDNN acceleration switch (uncomment to build with cuDNN).
- USE_CUDNN := 1
- # CPU-only switch (uncomment to build without GPU support).
- # CPU_ONLY := 1
- # To customize your choice of compiler, uncomment and set the following.
- # N.B. the default for Linux is g++ and the default for OSX is clang++
- # CUSTOM_CXX := g++
- # CUDA directory contains bin/ and lib/ directories that we need.
- CUDA_DIR := /usr/local/cuda
- # On Ubuntu 14.04, if cuda tools are installed via
- # "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
- # CUDA_DIR := /usr
- # CUDA architecture setting: going with all of them.
- # For CUDA < 6.0, comment the *_50 lines for compatibility.
- CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
- -gencode arch=compute_20,code=sm_21 \
- -gencode arch=compute_30,code=sm_30 \
- -gencode arch=compute_35,code=sm_35 \
- -gencode arch=compute_50,code=sm_50 \
- -gencode arch=compute_50,code=compute_50
- # BLAS choice:
- # atlas for ATLAS (default)
- # mkl for MKL
- # open for OpenBlas
- BLAS := atlas
- # Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
- # Leave commented to accept the defaults for your choice of BLAS
- # (which should work)!
- # BLAS_INCLUDE := /path/to/your/blas
- # BLAS_LIB := /path/to/your/blas
- # Homebrew puts openblas in a directory that is not on the standard search path
- # BLAS_INCLUDE := $(shell brew --prefix openblas)/include
- # BLAS_LIB := $(shell brew --prefix openblas)/lib
- # This is required only if you will compile the matlab interface.
- # MATLAB directory should contain the mex binary in /bin.
- # MATLAB_DIR := /usr/local
- # MATLAB_DIR := /Applications/MATLAB_R2012b.app
- # NOTE: this is required only if you will compile the python interface.
- # We need to be able to find Python.h and numpy/arrayobject.h.
- #PYTHON_INCLUDE := /usr/include/python2.7 \
- /usr/lib/python2.7/dist-packages/numpy/core/include
- # Anaconda Python distribution is quite popular. Include path:
- # Verify anaconda location, sometimes it's in root.
- ANACONDA_HOME := $(HOME)/anaconda
- PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
- $(ANACONDA_HOME)/include/python2.7 \
- $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
- # We need to be able to find libpythonX.X.so or .dylib.
- #PYTHON_LIB := /usr/lib
- PYTHON_LIB := $(ANACONDA_HOME)/lib
- # Homebrew installs numpy in a non standard path (keg only)
- # PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
- # PYTHON_LIB += $(shell brew --prefix numpy)/lib
- # Uncomment to support layers written in Python (will link against Python libs)
- # WITH_PYTHON_LAYER := 1
- # Whatever else you find you need goes here.
- INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
- LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
- # If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
- # INCLUDE_DIRS += $(shell brew --prefix)/include
- # LIBRARY_DIRS += $(shell brew --prefix)/lib
- # Uncomment to use `pkg-config` to specify OpenCV library paths.
- # (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
- # USE_PKG_CONFIG := 1
- BUILD_DIR := build
- DISTRIBUTE_DIR := distribute
- # Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
- # DEBUG := 1
- # The ID of the GPU that 'make runtest' will use to run unit tests.
- TEST_GPUID := 0
- # enable pretty build (comment to see full commands)
- Q ?= @
保存退出
- make all -j4
- make test
- make runtest
- make pycaffe
NOTE:以上是我在自己PC上的安装步骤,因软件版本不同,硬件环境不同,按照以上方式可能出现错误,请耐心查找错误,欢迎留言
Ubuntu 14.04+cuda 7.5+caffe安装配置相关推荐
- 2015.08.17 Ubuntu 14.04+cuda 7.5+caffe安装配置
2016.06.10 update cuda 7.5 and cudnn v5 2015.10.23更新:修改了一些地方,身边很多人按这个流程安装,完全可以安装 折腾了两个星期的caffe,windo ...
- NVIDIA DIGITS-2.0 + Ubuntu 14.04 + CUDA 7.0 + cuDNN 7.0 + Caffe 0.13.0环境配置
引言 DIGITS简介 DIGITS特性 资源信息 说明 DIGITS安装 软硬件环境 硬件环境 软件环境 操作系统安装 DIGITS安装前准备 安装CUDA70deb方式 安装cuDNN70 安装C ...
- Go在Ubuntu 14.04 64位上的安装过程
1. 从 https://golang.org/dl/ 或 https://studygolang.com/dl 下载最新的发布版本go1.10即go1.10.linux-amd64.tar.gz ...
- Ubuntu 14.04 FTP服务器--vsftpd的安装和配置
http://jingyan.baidu.com/article/67508eb4d6c4fd9ccb1ce470.html Ubuntu 14.04 FTP服务器--vsftpd的安装和配置 我们经 ...
- Caffe配置简明教程 ( Ubuntu 14.04 / CUDA 7.5 / cuDNN 5.1 )
1. 前言 本教程使用的系统是Ubuntu 14.04 LTS 64-bit,使用的CUDA版本为7.5,使用的NVIDIA驱动版本为352. 如果您使用的Pascal架构显卡,如GTX1080或者新 ...
- Ubuntu 14.04数据库服务器--mysql的安装和配置
https://jingyan.baidu.com/article/425e69e6bbc6c7be14fc1640.html mysql是Oracle公司的一种开放源代码的关系型数据库管理系统,被广 ...
- Ubuntu 14.04 ThinkPad E431无线网卡驱动安装
Ubuntu 14.04下安装无线网卡驱动. sudo apt-get install linux-headers-generic build-essential dkms sudo apt-ge ...
- Ubuntu 14.04(64位)安装和使用docker
Docker介绍: Docker是一个开源的应用容器引擎,可以通过docker来安装一个独立的系统(类似于虚拟机(Vmware)之类的),不过其特点是非常轻 ...
- 虚拟机 Ubuntu 14.04 LTS (64 bits) 下安装 Kurento v6 并运行 kurento-hello-world
这里是官网的教程,想自己折腾的可以完全对着官网教程来,然后不停的google遇到的问题. https://www.kurento.org/docs/6.0.0/installation_guide.h ...
最新文章
- python表单提交的两种方式_详解flask表单提交的两种方式
- Java基础学习总结(18)——网络编程
- python中不同类型的数据不能相互运算_PyTorch中Tensor的数据类型和运算的使用
- 怎么查看服务器是多少位系统,查看服务器是多少位的
- 【收藏】严重影响IDEA启动速度的插件
- 浏览器滚动条 --- 自定义“衣裳”
- JSON在Android网络交互中的使用方法
- Nginx教程负载均衡机制
- c语言 数组指针函数,C语言:数组 指针 函数
- SQL入门:第一章 建立自己的数据库
- 免费——离散数学(左孝凌)课后习题答案
- 【Virtualbox虚拟机Ubuntu系统安装VBoxGuestAdditions.iso增强包解决办法】
- matlab 指数函数拟合,[转载]MATLAB数据拟合例子(一次函数、指数函数、双曲线)...
- Excel批注教学:一键添加多个不同批注
- nodejs调用wasm系列-保利威视-难度等级二
- 先有蛋还是先有鸡?互联网的线上线下
- Day_03——MySQL数据库查询语句练习
- 蓝桥杯 土地的面积计算
- 开源的压力测试工具 PyLot
- jquery鼠标移入文字提示_Jquery hover鼠标经过时弹出div动态提示语
热门文章
- html锚点反向联动,vue 实现导航锚点联动
- Error: EACCES: permission denied, symlink
- JavaScript 编程精解 中文第三版 零、前言
- 使用PowerShell调用MTools分析MongoDB性能并发送邮件
- 难离难舍的internet2与SDN
- C++11之右值引用(三):使用C++11编写string类以及“异常安全”的=运算符
- they're hiring
- [CTO札记]MM晕倒地铁中--最适合的活动未必是阅读
- 用Python解“两个数的简单计算器”题
- 直流降压的简单方法_空调室内机电源电路检修方法。