0%

修复 nvidia gpg key 问题

问题描述:

在build docker的时候出现报错

1
The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease' is not signed.

仓库如下

1
pytorch/pytorch:1.10.0-cuda11.3-cudnn8-devel

解决方案:

https://tickets.dominodatalab.com/hc/en-us/articles/6101281885076-Build-error-for-nvidia-GPG-key

A new key is available and can be installed in your build with the following process. Take note of the inline comments as they are important.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#fix nvidia gpg key
# if you also have gpg/pgsql/sbt fix, put this before
RUN \
#The following files may not exist in your environment and the commands will fail the build if they don't,
#so comment out the next two lines as needed
sudo rm /etc/apt/sources.list.d/cuda.list && \
sudo rm /etc/apt/sources.list.d/nvidia-ml.list && \
#
#The ubuntu version in the URL below is important, note this example is for Ubuntu 18.04.
#You can find your ubuntu version with the command in a workspace terminal.
#lsb_release -a
#
#Update the URL as per the following nvidia article
#https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb && \
sudo apt-key del 7fa2af80 && \
sudo dpkg -i cuda-keyring_1.0-1_all.deb

NOTE: when adding the additional instructions make sure the new RUN commands are executed prior to any other update operations (apt or yum), otherwise the run will fail .