Ubuntu16.04 安装 Caffe, opencv3, cuda8

1.1 install ubuntu 16.04 with win10 choose [UEFI both]

1.2 update download source















2 install caffe[https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide]


2.1 install some pacakges

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install -y build-essential cmake git pkg-config

sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler

sudo apt-get install -y libatlas-base-dev 

sudo apt-get install -y --no-install-recommends libboost-all-dev

sudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev

# (Python general)
sudo apt-get install -y python-pip

# (Python 2.7 development files)
sudo apt-get install -y python-dev
sudo apt-get install -y python-numpy python-scipy

# (or, Python 3.5 development files)
#sudo apt-get install -y python3-dev
#sudo apt-get install -y python3-numpy python3-scipy

# (OpenCV 2.4)
#sudo apt-get install -y libopencv-dev

#(or, OpenCV 3.1 - see the instructions below)


2.2 install nvidia driver















2.3 install cuda https://developer.nvidia.com/cuda-downloads


2.4 copy cudnn https://developer.nvidia.com/cudnn


2.5 install opencv3


sudoapt-get install --assume-yes build-essential cmake git

sudo apt-get install --assume-yes build-essential pkg-config unzip ffmpeg qtbase5-dev python-dev python3-dev python-numpy python3-numpy
sudo apt-get install --assume-yes libopencv-dev libgtk-3-dev libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev
sudo apt-get install --assume-yes libavcodec-dev libavformat-dev libswscale-dev libxine2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
sudo apt-get install --assume-yes libv4l-dev libtbb-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev
sudo apt-get install --assume-yes libvorbis-dev libxvidcore-dev v4l-utils

git clone https://github.com/opencv/opencv.git
mkdir build
cd build/
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..    
make -j $(($(nproc) + 1))

Integrationwith the Caffe

Returnto the Caffe directory and perform a cleanup operation with thecommand

makeclean

(Readmorehere: https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide)

First,edit the Makefile.config to include the OpenCV 3.1 library likethis...

OPENCV_VERSION:= 3

LIBRARY_DIRS:= $(PYTHON_LIB) /usr/local/lib /usr/lib/usr/lib/x86_64-linux-gnu/hdf5/serial/usr/local/share/OpenCV/3rdparty/lib/

Then,recompile the entire Caffe project.

2.6 configure Makefile
https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide















评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值