准备工作
#在滴滴云上安装,选择已经安装好cuda9、cudnn7的镜像
#滴滴云默认不是root,所以首先切换到root
sudo su
#升级pip
sudo pip install --upgrade pip
安装caffe
#安装一些依赖包
sudo apt-get install --no-install-recommends build-essential cmake git gfortran libatlas-base-dev libboost-filesystem-dev libboost-python-dev libboost-system-dev libboost-thread-dev libgflags-dev libgoogle-glog-dev libhdf5-serial-dev libleveldb-dev liblmdb-dev libopencv-dev libsnappy-dev python-all-dev python-dev python-h5py python-matplotlib python-numpy python-opencv python-pil python-pip python-pydot python-scipy python-skimage python-sklearn
#下载源代码
mkdir ~/caffe
export CAFFE_ROOT=~/caffe
#按照官方的说明文档中,截至2019.1.24日Digits仅支持caffe 0.15
git clone https://github.com/NVIDIA/caffe.git $CAFFE_ROOT -b 'caffe-0.15'
#安装python依赖包
sudo pip install -r $CAFFE_ROOT/python/requirements.txt
#安装过程中有报错,不用管它
#pandas 0.23.4 has requirement python-dateutil>=2.5.0, but you'll have python-dateutil 1.5 which is incompatible.
#networkx 2.2 has requirement decorator>=4.3.0, but you'll have decorator 4.0.6 which is incompatible.
#安装protobuf
sudo apt-get install protobuf-compiler libprotobuf-dev
编译caffe
cd $CAFFE_ROOT
mkdir build
cd build
cmake ..
make -j"$(nproc)"
make install
安装Digits
#下载源代码
DIGITS_ROOT=~/digits
git clone https://github.com/NVIDIA/DIGITS.git $DIGITS_ROOT
#安装依赖包
sudo pip install -r $DIGITS_ROOT/requirements.txt
sudo pip install -e $DIGITS_ROOT
#安装python-tk
sudo apt-get install python-tk
#运行Digits
./digits-devserver