远程服务器 ubuntu16.04 caffe+matlab r2014b+python+cpu-only配置(二)
2018-02-18 16:38
459 查看
配置Caffe+Matlab+Python(CPU-ONLY)
本文参考文章:ubuntu16.04, Matlab2016b caffe编译安装:https://www.cnblogs.com/haoliuhust/p/7738920.html
官方安装文档:http://caffe.berkeleyvision.org/installation.html
Ubuntu16.04安装Caffe(CPU Only):http://blog.csdn.net/muzilinxi90/article/details/53673184
安装依赖项
$ sudo apt update $ sudo apt search openblas $ sudo apt install libopenblas-dev $ sudo update-alternatives --config libblas.so.3
$ sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler $ sudo apt-get install --no-install-recommends libboost-all-dev
$ sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
此外还要安装git,cmake
$ sudo apt-get install git $ sudo apt-get install cmake
下载Caffe源码
$ git clone https://github.com/BVLC/caffe.git $ cd caffe/
python 依赖库
$ cd python/ $ apt-get install python-pip $ pip install --upgrade pip $ for req in $(cat requirements.txt); do pip install $req; done
编译Caffe
在Caffe文件夹下,拷贝一份Makefile.config.example并重命名成Makefile.config,修改该配置文件:$ cp Makefile.config.example Makefile.config
打开Makefile.config(vi Makefile.config),因为这里没有配置GPU,所以去掉CPU_ONLY := 1前面的注释,MATLAB_DIR后改为matlab的安装地址
由于Ubuntu16.04文件结构的变化,#Whatever else you find you need goes here.处要改成下面这样:
# Whatever else you find you need goes here. INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
注意: 每条路径之间一定要有空格,否则仍然会报错
接下来编译Caffe
$ make all $ make test $ make runtest
编译python接口
$ make pycaffe
进入caffe/python,打开python,输入import caffe,如果没有报错则配置成功
编译matlab接口
$ make matcaffe $ make mattest
相关文章推荐
- 远程服务器 ubuntu16.04 caffe+matlab r2014b+python+cpu-only配置(三)
- 远程服务器 ubuntu16.04 caffe+matlab r2014b+python+cpu-only配置(一)
- Ubuntu 16.04远程登录服务器--ssh的安装和配置
- Ubuntu16.04服务器安装配置MySQL并开启远程连接
- Ubuntu 16.04远程登录服务器--ssh的安装和配置
- Ubuntu 16.04远程登录服务器--ssh的安装和配置
- Caffe + Ubuntu 15.04/16.04 + CUDA 7.5/8.0 在服务器上安装配置及卸载重新安装(已测试可执行)
- Ubuntu server 16.04 配置tftp服务器
- Ubuntu16.04 x64服务器配置最新tcp拥塞控制算法bbr
- ubuntu上配置mysql远程服务器
- Ubuntu 16.04服务器 配置
- Ubuntu SSh远程管理服务器安装配置
- Ubuntu16.04 server下配置MySQL,并开启远程连接
- ubuntu16.04服务器配置ssh免密码登录
- ubuntu16.04搭建FASTDFS图片服务器并配置nginx
- Ubuntu 16.04 安装远程登录服务器 SSH
- 阿里云ubuntu 16.04 Server配置方案 2 远程控制桌面
- Caffe_Linux学习笔记(一)基于Ubuntu16.04+CPU only+Python2.7环境下的Caffe配置
- Ubuntu远程登录服务器--ssh的安装和配置
- Ubuntu 14.04远程登录服务器--ssh的安装和配置