Forgive me. I have to record the PRocess in this blog in English for I do not install Chinese input method in new Ubuntu system yet.
1 Install opencv
Download opencv 2.49(recommend) from offical website.Install some required library.sudo apt-get install build-essential cmake libgtk2.0-dev pkg-config python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev
create folder in source folder of opencv mkdir release
, then cd ./release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make all
sudo make all
sudo gedit /etc/ld.so.conf.d/opencv.conf
and input /usr/local/lib
2 install cuda
I downgrade gcc and g++ to 4.7 for my cuda version is 7.5. Or you cant install cuda with 8.0 version sudo apt-get install gcc-4.7 g++-4.7 cd /usr/bin sudo rm -fr gcc g++ sudo ln -s gcc-4.4 gcc sudo ln -s g++-4.4 g++ gcc -v g++ -v
Download cuda(*.run recomend) from offical websitinstall Add cuda environment variable. sudo gedit /etc/profile PATH=/usr/local/cuda/bin:$PATH export PATH source /etc/profile
add path of lib sudo gedit /etc/ld.so.conf.d/cuda.conf /usr/local/cuda/lib64 sudo ldconfig
I upgrade gcc and g++ to its original version3 Install third party libraries
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libboost-all-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler libatlas-base-dev
There are three kinds of clbas libraries but atlas is ease to install.
4 compile caffe
problem like can’t find hdf5.h, add the path hdft_serial to makefile and Makefile.config problem with google protobuf, compile protobuf with source code from github(it need to download gmock over the wall but you can download from github and find it by yourself ). problem with gcc version when nvcc compile caffe cu file, just comment one line in one file, but I forget the exact file . 5 python interface compile use pyenv and anaconda (recommend Install method)
sudo apt-get install pip sudo pip install -r ./python/requirements.txtprotobuf compile with source code download gmock and protobuf, and extract gmock to root directory of protobuf. c++ interface
sudo apt-get install autoconf automake libtool curl./autogen./configuremakemake checksudo make installpython interface
cd pythonpython setup.py buildpython setup.py testpython setup.py install新闻热点
疑难解答