Ubuntu16.04+caffe+digits安装配置
来源:互联网 发布:大数据解决方案的公司 编辑:程序博客网 时间:2024/06/05 09:54
注:本文主要介绍的是如何在ubuntu16.04系统下安装caffe以及可视化工具digits,至于cuda和cudnn的安装配置在我前一篇文章http://blog.csdn.net/cdwxx1234/article/details/75121562已经介绍了,此文不再重复。不多说了,我们开始吧!
一.必要依赖包安装
- sudo apt-get install build-essential
- sudo apt-get install --no-install-recommends libboost-all-dev
- sudo apt-get install libatlas-base-dev libgflags-dev libgoogle-glog-dev liblmdb-dev
- sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
- sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran python-numpy
二.安装pip和easy-install
- cd
- wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
- sudo python ez_setup.py --insecure
- wget https://bootstrap.pypa.io/get-pip.py
- sudo python get-pip.py
三.
安装
caffe
及
python
依赖
1).安装git
- sudo apt-get install git
2).获取caffe源码(可cd到指定文件夹下下载):
- git clone https://github.com/BVLC/caffe.git
3).在caffe根目录python文件夹下安装依赖项;
- sudo apt-get install python-pip
- sudo for req in $(cat "requirements.txt"); do pip install -i https://pypi.tuna.tsinghua.edu.cn/simple $req; done
四.编译caffe
打开终端
- cd caffe
- sudo cp Makefile.config.example Makefile.config
- sudo gedit Makefile.config
在打开的Makefile.config文件中做如下修改;
1).将USE_CUDNN := 1取消注释;2).INCLUDE_DIRS := $(PYTHON_INCLUDE)/usr/local/include空格后然后添加/usr/include/hdf5/serial /usr/local/cuda-8.0/include/(添加cuda的include路径);
3).LIBRARY_DIRS:=$(PYTHON_LIB)/usr/local/lib /usr/lib 空格后添加 /usr/local/cuda-8.0/lib64/(添加cuda的lib路径);
接着就开始编译caffe
- make all –j16 (16线程,线程越多速度越快)
- make test –j16
- make runtest –j16
- make pytest –j16
一般在编译make all 的时候可能会出错,后面出错的几率不大。碰到的问题和解决方法与安装目标检测ssd遇到的一样,具体参考http://blog.csdn.net/cdwxx1234/article/details/75136657。
编译成功后测试python
- cd caffe/python
- python
- import caffe
没有报错,编译就成功了。
五.安装digits
digits是caffe的一个可视化工具,可使我们对caffe的操作变得方便容易。
1).获取digits安装包
- sudo git clone https://github.com/NVIDIA/DIGITS.git digits
2).安装digits及依赖项
- cd digits
- sudo apt-get install graphviz gunicorn
- for req in $(cat requirements.txt); do sudopip install $req; done
3).打开digits
- cd digits
- ./digits-devserver
在网页上输入http://localhost:5000即可打开界面。
4).遇到的问题
在终端输入./digits-devserver后出现如下错误:
ValueError: Caffe executable not found inPATH
解决方案:
1).检查当前envvar的值
- echo $CAFFE_ROOT
- echo "export CAFFE_ROOT=/home/username(我的账户名)/caffe/" >> ~/.profile
- source ~/.profile
- echo $CAFFE_ROOT
- /home/username/caffe/
按上面的方法改了之后,digits顺利启动。
- Ubuntu16.04+caffe+digits安装配置
- Ubuntu16.04+caffe+digits安装配置
- ubuntu16.04+caffe+GTX1060+DIGITS安装方法
- ubuntu16.04配置安装caffe
- Ubuntu16.04 安装配置GPU版本Caffe
- Ubuntu16.04 安装配置GPU+Cudda+Caffe
- caffe安装和配置基于Ubuntu16.04
- ubuntu16.04配置GPU1080Ti 安装cuda caffe
- Ubuntu16.04配置Caffe
- ubuntu16.04配置caffe
- ubuntu16.04安装caffe
- Ubuntu16.04 安装caffe
- Ubuntu16.04 安装caffe
- Ubuntu16.04 Caffe安装
- Ubuntu16.04 安装Caffe
- Ubuntu16.04 安装Caffe
- Ubuntu16.04安装Caffe
- ubuntu16.04 安装 caffe
- Spring基础---自动装配的方式
- Paxos (computer science)
- HTML基本语法总结
- Struts2 ActionMethod 【DMI】(动态方法调用 Dynamic Method Invoke)
- cmd中执行Python命令时>>>与>提示符的不同结果
- Ubuntu16.04+caffe+digits安装配置
- 使用 Vim 的 jump list 看代码
- 相对父元素的位置坐标
- MySQL 5.7.20免安装版安装教程
- OnTouch关于performClick的Warning
- 最新vue-cli 2.9.1的webpack存在问题
- 自动化测试
- HDU4825 01trie+二进制
- OPENCV 2. 数据结构