Ubuntu14.04 安装 Caffe

1、安装依赖包

sudo apt-get install build-essential git vim cmake libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler

2、安装CUDA

   (1)下载cuda仓库安装包

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb

   (2)安装仓库   

sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb

   (3)更新源      

sudo apt-get update

   (4)安装CUDA及驱动

sudo apt-get install cuda

   (5)配置环境变量

     a.编辑/etc/profile文件:

sudo vim /etc/profile

      b.在profile文件底部加入:

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

     c.使profile文件生效:

source /etc/profile

3、安装ATLAS

sudo apt-get install libatlas-base-dev

4、获取Caffe   

 git clone https://github.com/BVLC/caffe.git

5、编译Caffe

cd caffe

 cp Makefile.config.example Makefile.config

 make all

make test

make runtest


你可能感兴趣的:(caffe,Ubuntu14.04,Caffe,CUDA)