CaffeOnSpark in Ubuntu 15.04

筆尖的痕發表於2016-04-20

check nvidia:

lspci | grep -i nvidia

check gcc:

gcc --version


install cuda:
apt-get install build-essential
ll /etc/X11/xorg.conf
cd /etc/X11
mv xorg.conf xorg.conf.bak
vim /etc/modprobe.d/blacklist-nouveau.conf

blacklist nouveau option nouveau modeset=0

update-initramfs -u


Ctrl + Alt + F1 to tty

service lightdm stop


./cuda_7.5.18_linux.run --no-opengl-libs


modprobe nvidia
ll /dev/nvidia*
service lightdm start


vim /etc/ld.so.conf.d/cuda.conf

/usr/local/cuda/lib64
/lib

ldconfig -v

vim /etc/profile

export PATH=/usr/local/cuda-7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH

source /etc/profile


check:

cat /proc/driver/nvidia/version
nvcc -V


service lightdm start

Ctrl+Alt+F7


Go to NVIDIA_CUDA-7.5_Samples folder through terminal:

make
cd bin/x86_64/linux/release/
./deviceQuery
./bandwidthTest


reboot


prepare :

sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev
sudo apt-get install --no-install-recommends libboost-all-dev build-essential libtool autoconf
note:

protobuf-compiler is not in the list.

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

gedit /etc/ld.so.conf.d/intel_mkl.conf

/opt/intel/lib/intel64
/opt/intel/mkl/lib/intel64

ldconfig -v

OpenCV 3.0.0 install:

sh Ubuntu/dependencies.sh

sh opencv3_0_0.sh

glog install:

tar zxvf glog-0.3.3.tar.gz
./configure
make
sudo make install

install dependences:

 apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler protobuf-c-compiler protobuf-compiler

apt-get install -y python-numpy python-scipy python-matplotlib python-sklearn python-skimage python-h5py python-protobuf python-leveldb python-networkx python-nose python-pandas python-gflags Cython ipython

install nVidia cuDNN:

cp include/cudnn.h /usr/local/include
cp lib64/libcudnn.* /usr/local/lib
make link:

ln -sf /usr/local/lib/libcudnn.so.4.0.7 /usr/local/lib/libcudnn.so.4
ln -sf /usr/local/lib/libcudnn.so.4 /usr/local/lib/libcudnn.so
ldconfig -v

prepare caffe:

cp Makefile.config.example Makefile.config
example like this:

vim caffe-public/Makefile.config

USE_CUDNN := 1

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/lib/x86_64-linux-gnu/hdf5/serial/include

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

BLAS := mkl

PYTHON_LIB := /usr/local/lib

OPENCV_VERSION =3

vim caffe-public/Makefile

at line 198:

# LIBRARIES += opencv_imgcodecs

vim caffe-distri/Makefile

at line 128:

# LIBRARIES += opencv_imgcodecs

install protobuf 2.5.0

cd protobuf-2.5.0

./autogen.sh
./configure
make
make check
make install
ldconfig
protoc --version


cd CaffeOnSpark
make -j8 ALL


http://ouxinyu.github.io/Blogs/20151108001.html

http://caffe.berkeleyvision.org/install_apt.html


相關文章