1、查看cuda和cudnn版本
cuda 版本
cat /usr/local/cuda/version.txt
cudnn 版本
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
3、安装caffe2,用conda安装比较方便,如果环境不匹配可以多试几次
conda install -c caffe2 caffe2-cuda8.0-cudnn74、之后还要安装NCCL2
- Install the repository.
- For the local NCCL repository:
sudo dpkg -i nccl-repo-<version>.deb
- For the local NCCL repository:
这里首先下载了nccl-repo-ubuntu1404-2.1.15-ga-cuda8.0_1-1_amd64.deb,之后通过
sudo apt-get install libnccl2 libnccl-dev 安装相应的库,之后运行如下验证代码:
# To check if Caffe2 build was successful
python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
# To check if Caffe2 GPU build was successful
# This must print a number > 0 in order to use Detectron
python -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'都ok说明caffe2安装完成。
本文档提供了详细的步骤来检查和更新CUDA及cuDNN版本至8.0和7,并使用conda安装Caffe2。此外,还介绍了如何安装NCCL2并验证Caffe2的构建是否成功。
2398

被折叠的 条评论
为什么被折叠?



