在没有sudo的情况下,caffe的编译简直是个无比痛苦的事情,在折腾了整整三天之后,终于编了出来,这里把编译的过程记下来
Dependencies内容:
手动编译
Boost
Google-glog
Google-gflags
Google-protobuf
HDF5
Snappy
OpenCV
Python(Anaconda)
已有或联系管理员
Threads
OpenMP
LMDB
LevelDB
CUDA
BLAS(设置 MKL,Intel)
未安装(不影响编译)
Matlab
Doxygen
python相关的依赖,下载anaconda一步解决:
sh Anaconda2-5.1.0-Linux-x86_64.sh
pip install numpy #一般来说已经是最新的了
Boost:
wget https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
tar zxvf boost_1_66_0.tar.gz
cd boost_1_66_0.tar.gz
./bootstrap.sh --with-libraries=all ##--with-libraries指定编译哪些boost库,all的话就是全部编译,只想编译部分库的话就把库的名称写上,之间用, 号分隔即可。
命令执行完后看到如下所示即为成功:
Building Boost.Build engine with toolset gcc... tools/build/src/engine/bin.linuxx86_64/b2
Detecting Python version... 2.6
Detecting Python root... /usr
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam...
Bootstrapping is done. To build, run:
./b2
To adjust configuration, edit 'project-config.jam'.
Further information:
- Command line help:
./b2 --help
- Getting started guide:
http://www.boost.org/more/getting_started/unix-variants.html
- Boost.Build documentation:
h