Solution to Invalid Public Key for CUDA Apt Repository
Contents
Problem
Got this error when I build DockerFile
...
W: GPG error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease' is not signed.
Reason
Due to a key update in the CUDA Linux GPG repository: Nvidia has updated the gpg key, you should update gpg key to handle this!
Solution
Just add this code into the DockerFile.
RUN apt-key del A4B469963BF863CC
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
Then, problem solved!
I hope that this article will be of some help to you!