Solvednvidia docker CUDA / Docker & GPG error

1. Issue or feature description:

Installation of cuda inside docker (ubuntu 16) fails. From the docker build log:

Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Ign:2 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Ign:4 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64  InRelease
Hit:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:6 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release [564 B]
Hit:7 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64  Release
Hit:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:9 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release.gpg [801 B]
Ign:9 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Release.gpg
Hit:11 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Packages
Err:11 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64  Packages
  Hash Sum mismatch
Fetched 1365 B in 0s (2658 B/s)
Reading package lists...
[91mW: 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.
E: Failed to fetch store:/var/lib/apt/lists/partial/developer.download.nvidia.com_compute_cuda_repos_ubuntu1604_x86%5f64_Packages.gz  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

2. Steps to reproduce the issue

Dockerfile.txt

17 Answers

✔️Accepted Answer

I don't know when it will be fixed.

This is a potential workaround:

FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04

RUN rm /etc/apt/sources.list.d/cuda.list

Other Answers:

Here is my solution
in your Dockerfile add this line RUN apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub before apt-get update

More Issues: