Caffe Installation
来源:互联网 发布:匿名免费发短信软件 编辑:程序博客网 时间:2024/06/07 02:52
以下安装步骤针对将所有依赖软件和caffe都安装在自己的 linux 账户下, 除了cuda/6.5
首先安装 boost,
Boost
1. download boost.tar.gz (google boost library)2. tar -zxvf boost.tar.gz 3. cd boost4. ./bootstrap.sh5. mkdir build6. ./b2 install --prefix=/your/path/boost/build/
然后在 ~/.bashrc 中加入
boost (self-built)export PATH=/your/path/boost/:$PATHexport LD_LIBRARY_PATH=/your/path/boost_1_55_0/build/lib/:$LD_LIBRARY_PATHexport LIBRARY_PATH=/your/path/boost_1_55_0/build/lib/:$LIBRARY_PATHexport C_INCLUDE_PATH=/your/path/libs/boost_1_55_0/build/include/:$C_INCLUDE_PATHexport CPLUS_INCLUDE_PATH=/your/path/boost_1_55_0/build/include/:$CPLUS_INCLUDE_PATH
Path links /bin dir, LD_LIBRARY_PATH, LIBRARY_PATH link /lib dir, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH link /include dir
Cmake
解压好,然后在 ~/.bashrc 里link path就好
#cmakeexport PATH=/your/path/cmake_3_1_3/bin:$PATH
gflags
1. download and tar -zxvf2. cd gflags3. mkdir build & cd build4. cmake .. -DCMAKE_INSTALL_PREFIX=/your/path/gflags/build5. make6. make install
然后在 ~/.bashrc 中加入
#gflagsexport PATH=/your/path/gflags-2.1.1/build/bin:$PATHexport LD_LIBRARY_PATH=/your/path/gflags-2.1.1/build/lib/:$LD_LIBRARY_PATHexport LIBRARY_PATH=/your/path/gflags-2.1.1/build/lib/:$LIBRARY_PATHexport C_INCLUDE_PATH=/your/path/gflags-2.1.1/build/include/:$C_INCLUDE_PATHexport CPLUS_INCLUDE_PATH=/your/path/gflags-2.1.1/build/include/:$CPLUS_INCLUDE_PATH
在编caffe时,发现它会报错,说需要用 -fPIC 的命令
所以在 gflags 里的CMakelist.txt里加
set(CMAKE_CXX_FLAGS “-fPIC”)
Protobuf-2.6.1
1. download and tar -zxvf3. mkdir build5. ./configure --prefix=/your/path/gflags/build6. make7. make check8. make install
然后在 ~/.bashrc 中加入
#protobufexport PATH=/your/path/protobuf-2.6.1/build/bin:$PATH export LD_LIBRARY_PATH=/your/path/protobuf-2.6.1/build/lib/:$LD_LIBRARY_PATH export LIBRARY_PATH=/your/path/protobuf-2.6.1/build/lib/:$LIBRARY_PATH export C_INCLUDE_PATH=/your/path/protobuf-2.6.1/build/include/:$C_INCLUDE_PATHexport CPLUS_INCLUDE_PATH=/your/path/protobuf-2.6.1/build/include/:$CPLUS_INCLUDE_PATH
glog_0.3.3
snapply
the same as protobuf
pip
[1] cd ${HOME}[2] mkdir pip[3] cd pip/[4] wget https://bootstrap.pypa.io/get-pip.py[5] python get-pip.py --user
.bashrc
export PATH=/home/ywchao/.local/bin:$PATH
Install python libraries[1] pip install --user six[2] pip install --user scikit-image[3] pip install --user scipy[4] pip install --user protobuf[5] pip install --user pyyaml
lmdb
1. download from https://gitorious.org/mdb/mdb/source/3368d1f5e243225cba4d730fba19ff600798ebe3:libraries/liblmdb2. cd liblmdb3. make
.bashrc
export PATH=/your/path/prerequisites/liblmdb:$PATHexport LD_LIBRARY_PATH=/your/path/prerequisites/liblmdb:$LD_LIBRARY_PATHexport LIBRARY_PATH=/your/path/prerequisites/liblmdb:$LIBRARY_PATHexport C_INCLUDE_PATH=/your/path/prerequisites/libmdb:$C_INCLUDE_PATHexport CPLUS_INCLUDE_PATH=/your/path/prerequisites/liblmdb:$CPLUS_INCLUDE_PATH
hdf5
1. download from http://www.hdfgroup.org/HDF5/release/obtainsrc.html#conf2. cd hdf53. ./configure --prefix=/home/your/path4. make all5. make check6. make install
.bashrc
export PATH=/your/path/prerequisites/hdf5-1.8.14/bin:$PATHexport LD_LIBRARY_PATH=/your/path/prerequisites/hdf5-1.8.14/lib:$LD_LIBRARY_PATHexport LIBRARY_PATH=/your/path/prerequisites/hdf5-1.8.14/lib:$LIBRARY_PATHexport C_INCLUDE_PATH=/your/path/prerequisites/hdf5_1.8.14/include:$C_INCLUDE_PATHexport CPLUS_INCLUDE_PATH=/your/path/prerequisites/hdf5-1.8.14/include:$CPLUS_INCLUDE_PATH
leveldb
1. download 2. cd leveldb4. make all5. make check6. make install
.bashrc
#leveldbexport PATH=/your/path/prerequisites/leveldb-1.15.0:$PATH export LD_LIBRARY_PATH=/your/path/prerequisites/leveldb-1.15.0:$LD_LIBRARY_PATH export LIBRARY_PATH=/your/path/prerequisites/leveldb-1.15.0:$LIBRARY_PATH export C_INCLUDE_PATH=/your/path/prerequisites/hdf5_1.8.14/include:$C_INCLUDE_PATHexport CPLUS_INCLUDE_PATH=/your/path/prerequisites/leveldb-1.15.0/include:$CPLUS_INCLUDE_PATH
MKL
在 https://software.intel.com/en-us/intel-education-offerings 注册student账号,然后点击收到邮件的链接即可
进去后直接按步骤安装就好,其中需选择不覆盖原文件
mkl 在
opencv ###
download opencv-2.4.10
1. mkdir build2. cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/your/path/prerequisites/opencv-2.4.10/build/ -DBUILD_PYTHON_SUPPORT=ON3. make4. make all
目前会报错
make matcaffe 报错
在 make matcaffe 的时候,会出现 boost 报错
解决的办法是:
在 Makefile.config 里的 LIBRARY_DIRS 里加入 boost 的 lib, 这样在 Makefile 里也会出现 boost
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /your/path/prerequisites/boost_1_55_0/build/lib
- Caffe Installation
- [Caffe]:Caffe Installation
- Caffe Installation安装笔记
- Caffe installation on ubuntu16.04 sever
- Ubuntu 16.04 + caffe + cuda Installation Mannual
- Ubuntu16.04+CUDA8.0+ANACONDA2+cuDNN+caffe+opencv installation
- caffe CMAKE Error Variables set to NOTFOUND in Installation of Caffe HDF5_hdf5_cpp_Library linked
- Caffe
- Caffe
- Caffe
- caffe
- Caffe
- Caffe
- Caffe
- caffe
- caffe
- caffe
- caffe
- APP应用中发短信
- python 2.6 升级到 2.7
- 相容方程
- 搜集整理了Object-C现阶段学习中常见的问题
- 关于Nodejs中使用Log4js 解决方案
- Caffe Installation
- 2015春节见闻
- [Codeforces #294(Div 2)]简要题解
- [Errno 4] IOError: [Errno 5] Input/output error yum
- Android] ImageView.ScaleType设置图解
- 排序算法--快速排序
- Python--ZOJ1049
- Excel内文本型日期更改格式
- Java4Android学习十六 - equals()、hashCode()、toString()