NVIDIA/DIGITS build Caffe

来源:互联网 发布:淘宝个人中心在哪里找 编辑:程序博客网 时间:2024/05/18 03:57

参考:https://github.com/NVIDIA/DIGITS/blob/digits-5.0/docs/BuildCaffe.md#dependencies

Building Caffe

DIGITS requires a build of Caffe. We officially only support recent releases from NVIDIA/caffe (NVcaffe), but any recent build of BVLC/caffe will probably work too.

Dependencies

For best performance, you'll want:

  • One or more NVIDIA GPUs (details)
  • An NVIDIA driver (details and installation instructions)
  • A CUDA toolkit (details and installation instructions)
  • cuDNN (download page)

Install some dependencies with Deb packages:

sudo apt-get install --no-install-recommends build-essential cmake git gfortran libatlas-base-dev libboost-all-dev libgflags-dev libgoogle-glog-dev libhdf5-serial-dev libleveldb-dev liblmdb-dev libopencv-dev libprotobuf-dev libsnappy-dev protobuf-compiler python-all-dev python-dev python-h5py python-matplotlib python-numpy python-opencv python-pil python-pip python-protobuf python-scipy python-skimage python-sklearn

Download source

# example location - can be customizedexport CAFFE_ROOT=~/caffegit clone https://github.com/NVIDIA/caffe.git $CAFFE_ROOT

Setting the CAFFE_ROOT environment variable will help DIGITS automatically detect your Caffe installation, but this is optional.

Python packages

Several PyPI packages need to be installed:

sudo pip install -r $CAFFE_ROOT/python/requirements.txt

If you hit some errors about missing imports, then use this command to install the packages in order (see discussion here):

cat $CAFFE_ROOT/python/requirements.txt | xargs -n1 sudo pip install

Build

We recommend using CMake to configure Caffe rather than the raw Makefile build for automatic dependency detection:

cd $CAFFE_ROOTmkdir buildcd buildcmake ..make --jobs=4
0 0
原创粉丝点击