1. Download the source code from GitHub
git clone https://github.com/BVLC/caffe.git
2. Installing the BLAS Library
Select Install MKL, download the student version on the official website, unzip to the storage directory. Authorize the extracted files first
chmod a+x parallel_studio_xe_2015 -R
Then execute with root permission
sudo ./install.sh(一般都选择默认的选项)sudo vim /etc/ld.so.conf.d/intel_mkl.conf
Configure the environment, add the following content
/opt/intel/lib/intel64/opt/intel/mkl/lib/intel64
3. Installing Python Dependency Packages
Install Python-pip First
sudo apt-get install python-pip
Then go to the Python folder under Caffe and execute
for req in $(cat requirements.txt); do pip install $req; done
4. Installing CMake
sudo add-apt-repository ppa:george-edison55/cmake-3.xsudo apt-get updatesudo apt-get install cmake
5. Installing Glog
Https://github.com/google/glog.git (this address of the installation package will be error, download 0.3.3) into the folder, to perform
sudo ./configuresudo make sudo make install
6. Can be installed with Apt-get
sudo apt-get install Libboost-all-dev libprotobuf-dev libsnappy-dev libleveldb-dev libhdf5-serial-dev Libgflags-dev Libgoogle-glog-dev Liblmdb-dev Protobuf-compiler Libopencv-dev
7. Installing CUDNN
Download it from the official website and unzip it
sudo cp cudnn.h /usr/local/includesudo cp libcudnn.* /usr/local/lib
After copying the past, the soft connection is gone, and you have to link it again
8. Installing Caffe
Execute CP Makefile.config.example Makefile.config, modify part of the content
BLAS := mklUSE_CUDNN := 1前面注释去掉DEBUG := 1 //便于后面调试
Compile
make all -j8make test -j8make runtest -j8
Error:
1./bin/bash:aclocal-1.14:command not found
sudo apt-get install autotools-devsudo apt-get install automake
2.src/demangle.h:80:27:error:expected initializer before ' demangle '. Switch to version 0.3.3.
3./sbin/ldconfig.real:/usr/local/lib/libcudnn.so.7.0 is not a symbolic link. Re-establish soft links
Configure the Caffe------Ubuntu 14.04