caffe2非root安装之centos7

时间:2022-04-20 16:05:10

1、首先非root安装好caffe的依赖,没错,是caffe,保证caffe是可以运行的,这样可以确保安装的依赖是对的

2、下面按照官网历程进行,安装顺序如下:

2.1

更新一下gflag,首先要把之前安装的gflag删除
git clone https://github.com/gflags/gflags.git 
cd gflags
mkdir build && cd build
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS='-fPIC' -DCMAKE_INSTALL_PREFIX=$HOME/local ..
make -j8 && make install

更新一下glog,同样要把之前安装的glog删了

git clone https://github.com/google/glog cd glog mkdir build && cd build cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS='-fPIC' -DCMAKE_INSTALL_PREFIX=$HOME/local ..make -j8 &&  make install

2.2

更新Python

pip install \flask \future \graphviz \hypothesis \jupyter \matplotlib \numpy \protobuf \pydot \python-nvd3 \pyyaml \requests \scikit-image \scipy \setuptools \six \tornado

2.3

安装caffe2

git clone --recursive https://github.com/caffe2/caffe2cd caffe2 && mkdir buildcd build && cmake -DCMAKE_INSTALL_PREFIX=/home/lzhou/local ..make -j8 install

3

安装完之后做一下测试

caffe2非root安装之centos7

caffe2非root安装之centos7

输出数组