修改与之前修改nvcc、cuda这些的原理是一样的。
source /etc/os-release && echo $VERSION_ID
# 第一步若输出 16.04,请用下面的命令
curl -fsSL https://mirrors.cloud.tencent.com/nvidia-machine-learning/ubuntu1604/x86_64/7fa2af80.pub | apt-key add -
echo "deb https://mirrors.cloud.tencent.com/nvidia-machine-learning/ubuntu1604/x86_64/ /" > /etc/apt/sources.list.d/cuda.list
# 第一步若输出 18.04,请用下面的命令
curl -fsSL https://mirrors.cloud.tencent.com/nvidia-machine-learning/ubuntu1804/x86_64/7fa2af80.pub | apt-key add -
echo "deb https://mirrors.cloud.tencent.com/nvidia-machine-learning/ubuntu1804/x86_64/ /" > /etc/apt/sources.list.d/cuda.list
https://mirrors.cloud.tencent.com/nvidia-machine-learning/ubuntu1804/x86_64/
从镜像中找到对应版本
# 这里以8.0.3.33版本为例
apt-get update && apt-get install -y --no-install-recommends \
libcudnn8=8.0.3.33-1+cuda10.2 \
&& apt-mark hold libcudnn8 && \
rm -rf /var/lib/apt/lists/*
手机扫一扫
移动阅读更方便
你可能感兴趣的文章