centos7 install caffe

来源:互联网 发布:人工智能 书籍 编辑:程序博客网 时间:2024/06/05 00:35
yum install gcc gcc-c++
yum install git
yum install protobuf-c-compiler protobuf-compiler

## install caffe
pushd ./
cd ..
git clone https://github.com/BVLC/caffe
cd caffe
popd

#install dependency
yum install atlas-devel boost-devel protobuf-devel opencv-devel snappy-devel

#install automake
echo -e "\e[36m***Installing automake. Press ENTER when prompted*** \e[0m"
pushd ./
wget http://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
tar -xvf automake-1.14.tar.gz
cd automake-1.14
./configure
make -j4 && make install
popd

#install cmake
echo -e "\e[36m***Installing cmake. Press ENTER when prompted*** \e[0m"
yum install cmake

#install gflags
pushd ./
echo -e "\e[36m***Installing gflags. Press ENTER when prompted*** \e[0m"
git clone https://github.com/gflags/gflags
cd gflags
mkdir build && cd build
export CXXFLAGS="-fPIC" && cmake ..
make VERBOSE=1
make install
popd


#install glog
echo -e "\e[36m***Installing glog. Press ENTER when prompted*** \e[0m"
pushd ./
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-glog/glog-0.3.3.tar.gz
tar zxvf glog-0.3.3.tar.gz
cd glog-0.3.3
./configure
make && make install
popd

#install lmdb
echo -e "\e[36m***Installing lmdb. Press ENTER when prompted*** \e[0m"
pushd ./
git clone https://github.com/LMDB/lmdb
cd lmdb/libraries/liblmdb
make && make install
popd

#install hdf5
echo -e "\e[36m***Installing hdf5. Press ENTER when prompted*** \e[0m"
pushd ./
wget https://support.hdfgroup.org/ftp/HDF5/current18/src/hdf5-1.8.18.tar.gz
tar -xvf hdf5-1.8.18.tar.gz
cd hdf5-1.8.18
./configure --prefix=/usr/local
make && make install
popd

#install openblas
echo -e "\e[36m***Installing openblas. Press ENTER when prompted*** \e[0m"
pushd ./
git clone https://github.com/xianyi/OpenBLAS
cd OpenBLAS
make
make PREFIX=/usr/local install
popd


0 0
原创粉丝点击