[3] 服务器NCCL安装,Caffe源码编译测试

接着之前的安装cuda和cuDNN,继续安装NCCL,并编译Caffe源码

首先,下载nccl-repo-ubuntu1404-2.2.13-ga-cuda8.0_1-1_amd64.deb,这个可以在官网下载
因为下载的是本地的,所以直接sudo dpkg -i nccl-repo-ubuntu1404-2.2.13-ga-cuda8.0_1-1_amd64.deb
注意,本地和网络版方法不同

我在上一步执行完之后,收到一条提示

The public CUDA GPG key does not appear to be installed.
To install the key, run this command:
sudo apt-key add /var/nccl-repo-2.2.13-ga-cuda8.0/7fa2af80.pub

依照提示,执行sudo apt-key add /var/nccl-repo-2.2.13-ga-cuda8.0/7fa2af80.pub
然后再sudo dpkg -i nccl-repo-ubuntu1404-2.2.13-ga-cuda8.0_1-1_amd64.deb就行了

sudo apt update更新下
sudo apt-get install libnccl2=2.2.13-1+cuda8.0 libnccl-dev=2.2.13-1+cuda8.0安装

Caffe源码编译

这一步需要先布置开发环境

sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev 
sudo apt-get install libatlas-base-dev 
sudo apt-get install python-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev 
sudo apt-get install python-numpy python-scipy python-matplotlib python-sklearn python-skimage python-h5py python-protobuf python-leveldb python-networkx python-nose python-pandas python-gflags Cython ipython python-pydot
sudo apt-get install protobuf-c-compiler protobuf-compiler

然后,cd caffe-code/build/rm -rf ./*, cmake .., make -j8

你可能感兴趣的:([3] 服务器NCCL安装,Caffe源码编译测试)