linux caffe 64bit

来源:互联网 发布:淘宝免费转微信链接 编辑:程序博客网 时间:2024/06/05 03:53

i have been using caffe for 1 years. at first i used linux caffe. later i used windows caffe. i find although it is more convenient to debug in windows caffe, but a big disadvantage is GPU: it always has little problem such as trdLevel = 0 and so on. so in the end i walk back to linux caffe. now i will introduce my way to install it

to uninstall cuda-6.5, run uninstall script in /ust/local/cuda6.5/bin


in this time ,i find it quite easy! my system is ubuntu 14.04 and using gtx 770 graphic card.


1.install nvidia driver. my graphic card is gtx 770, i installed the driver 331(you can use 340or higher as long as you cuda driver support it)you dont need to stop lightdm or nouveaudriver(my default driver).using the following conmmand according your graphic card. here i used 331

# 331 driver$ sudo apt-get install nvidia-331# 334 driver$ sudo apt-get install nvidia-334# install the latest version$ sudo apt-get install nvidia-current
after that is done, reboot your system.

now your computer is using nvidia 221 driver!!is is not easy?? to verify this, using following command:

 lspci -vnn | grep -i VGA -A 12

then appered the following picture:

 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 770] [10de:1184] (rev a1) (prog-if 00 [VGA controller])
    Subsystem: Gigabyte Technology Co., Ltd Device [1458:360c]
    Flags: bus master, fast devsel, latency 0, IRQ 33
    Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e8000000 (64-bit, prefetchable) [size=128M]
    Memory at f0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at e000 [size=128]
    [virtual] Expansion ROM at f7000000 [disabled] [size=512K]
    Capabilities: <access denied>
    Kernel driver in use: nvidia

notice the last line : "  Kernel driver in use: nvidia", that is done!!!

you can also use

nvidia-settings

to open the gui of nvidia.thas is ok.


2 install cuda driver.

here i only installed the cuda driver for the purpose of lack of space .down load cuda run,.that is easy


3 install cudnn.this is also easy

- go to  https://developer.nvidia.com/cuDNN register,and download cuDNN安装包 cudnn-6.5-linux-R1.tgz
-  unzip cuDNN tgz:

 sudo tar -xvf cudnn-6.5-linux-R1.tgz

- copy and lib:

  sudo cp cudnn.h /usr/local/include  sudo cp libcudnn.so.6.5.18 /usr/local/lib  sudo cp libcudnn.so.6.5.18 /usr/local/lib



- llin :go into /usr/local/lib:

sudo chmod +r libcudnn.so.6.5.18sudo ln -sf libcudnn.so.6.5.18 libcudnn.so.6.5sudo ln -sf libcudnn.so.6.5 libcudnn.so

-  last:

sudo ldconfig

4 install the third part libraries

easy still!


sudo apt-get install libprotobuf-dev

# sudo apt-get install libleveldb-dev

# sudo apt-get install libsnappy-dev

# sudo apt-get install libopencv-dev

# sudo apt-get install libboost-all-dev

# sudo apt-get install libhdf5-serial-dev

# sudo apt-get install libgflags-dev

# sudo apt-get install libgoogle-glog-dev

# sudo apt-get install liblmdb-dev

# sudo apt-get install protobuf-compiler

that's end ! enjoy caffe!

0 0