Solvednvidia docker Invalid signature BADSIG F60F4B3D7FA2AF80 on Ubuntu 16.04

pwyq
118

My issue is very similar to #571; opening an new issue as the stuff suggested reply.
I am using nvidia/cuda:9.0-devel.

P.S: I am located in Toronto, Canada if that's the cause of the problem (as @flx42 mentioned might be a CDN issue).

Issue description

When I ran sudo apt-get update, I got following feedback from console.

W: GPG error: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release: The following signatures were invalid: BADSIG F60F4B3D7FA2AF80 cudatools <cudatools@nvidia.com>
W: The repository 'http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I have tried deleting & re-adding the key via different methods, while the issue still exists.

But when I ran docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi, the docker seems okay. I got:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 387.34                 Driver Version: 387.34                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 745     Off  | 00000000:01:00.0 Off |                  N/A |
| 20%   47C    P0    N/A /  N/A |    449MiB /  4042MiB |     25%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

So right now I am not sure whether that BADSIG F60F4B3D7FA2AF80 key will be a potential bomb, or I can just ignore that one.

Any helps appreciated, thanks in advance.

23 Answers

✔️Accepted Answer

Does it work if the repo is set as https?
Try the following inside the container:

$ apt-get update && apt-get install -y apt-transport-https
$ echo 'deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /' > /etc/apt/sources.list.d/cuda.list
$ apt-get update

Other Answers:

@lavender37 您好,请问一下您的这个是怎么具体解决的,感谢

我的问题是在创建docker时在apt update过程中出现了Invalid signature BADSIG F60F4B3D7FA2AF80
但是遗憾的是现在我已经完全无法连接developer.download.nvidia.com除非使用proxy
简单来说我当时使用gpg verify了developer.download.nvidia.com和developer.download.nvidia.cn的下载内容
然后说明我的个人见解,当使用docker国内连接到developer.download.nvidia.com时似乎会自动转到developer.download.nvidia.cn,而验证gpg时时,developer.download.nvidia.com的内容是能验证通过而developer.download.nvidia.cn的不能(原因未知)
所以考虑到这种差异,我在host文件中将developer.download.nvidia.cn解析到developer.download.nvidia.com对应的ip地址(原理等同于proxy),最终验证通过

I changed the download source. It's OK!

  1. backup the source.list:
    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

  2. modified the source.list and added mainland source(for example in Chinese Mainland):
    vi /etc/apt/sources.list

3 Note the source in the metafile and add the following address:

#Ali Cloud
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
  1. update source
    sudo apt-get update

5 upgrade software:

sudo apt-get dist-upgrade
sudo apt-get -f install

More Issues: