- OS: ubuntu 14.04
- linux kernel: 3.13.0-39
- graphic card: nvidia gtx 660
(I can't promise that this way can do well on laptop which graphic card include nvidia Optimus mechanisum)
- Install CUDA (include nvidia driver)
- Install build essential
- Download CUDA and Extract
- Press Ctrl-Alt-F1 and login
- Install
- Disable nouveau
- Other necessary libs. cudnn api download (Login and answer some questions to get the download permission.)
- Install caffe and testing
- USE_CUDNN := 1
- BLAS := open
- BLAS_INCLUDE := your-path-to-blas/OpenBLAS/build/include
- BLAS_LIB := your-path-to-blas/OpenBLAS/build/lib
sudo apt-get update && sudo apt-get install build-essential
wget http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run
sudo service lightdm stop sudo apt-get remove --purge nvidia-* # If it returns there are some process cause it can't be remove, i just kill them all and remove again.
cd nvidia_installer sudo ./NVIDIA-Linux-x86_64-340.29.run sudo ./cuda-linux64-rel-6.5.14-18749181.run sudo ./cuda-samples-linux-6.5.14-18745345.run # restart lightdm and disable nouveaus sudo service lightdm start(I set every settings by default!)
gedit /etc/modprobe.d/blacklist-nouveau.confand add
blacklist nouveau blacklist lbm-nouveau options nouveau modeset=0 alias nouveau off alias lbm-nouveau offReboot
update-initramfs -u sudo reboot
tar -xzvf cudnn-6.5-linux-R1.tgz cd cudnn-6.5-linux-R1 sudo cp lib* /usr/local/cuda/lib64/ sudo cp cudnn.h /usr/local/cuda/include/ sudo cp lib* /usr/local/lib sudo cp cudnn.h /usr/local/include sudo ln -sf /usr/local/lib/libcudnn.so.6.5.18 /usr/local/lib/libcudnn.so.6.5OpenBLAS
git clone https://github.com/xianyi/OpenBLAS cd OpenBLAS make mkdir build make install PREFIX=buildleveldb
git clone https://github.com/google/leveldb cd leveldb make sudo cp --preserve=links libleveldb.* /usr/local/lib sudo cp -r include/leveldb /usr/local/include/ sudo ldconfigothers
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
git clone https://github.com/BVLC/caffe cd caffe cp Makefile.config.example Makefile.config gedit Makefile.configedit:
#compile make all # test make testexport LD_LIBRARY_PATH=~/Library/OpenBLAS/build/lib/ make runtest