[翻译] Ubuntu安装NCCL2

用个小破双卡TITAN服务器,Paddle他喵的给我报了个warning,大体意思是只能用打卡,不能用双卡,要安装NCCL2

以下简要翻译只NCCL官方文档:

https://docs.nvidia.com/deeplearning/nccl/install-guide/index.html

1. 安装代码库

在 Ubuntu 上安装 NCCL 需要您首先将仓库添加到包含 NCCL 包的 APT 系统,然后通过 APT 安装 NCCL 包。 有两个仓库可用; 本地仓库和网络仓库。 建议选择后者,以便在发布新版本时轻松检索升级。

本地仓库安装,要从这里下载,找你对应的版本

https://developer.nvidia.com/nccl/nccl-download

在这里插入图片描述

网络安装法:

  • <architecture> 替换为你的CPU架构: x86_64, ppc64le, or sbsa
  • <distro> 替换为你的系统版本,比如 ubuntu1604, ubuntu1804, or ubuntu2004.
wget https://developer.download.nvidia.com/compute/cuda/repos/<distro>/<architecture>/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb

2. 更新你的apt数据库

sudo apt update

3. apt安装nccl2

使用 APT 安装 libnccl2 包。 此外,如果您需要使用 NCCL 编译应用程序,您还可以安装 libnccl-dev 包:

sudo apt install libnccl2 libnccl-dev

当然也可以这样指定你的版本:

sudo apt install libnccl2=2.4.8-1+cuda10.0 libnccl-dev=2.4.8-1+cuda10.0

猜你喜欢

转载自blog.csdn.net/HaoZiHuang/article/details/130855252