Same issue here, nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
Same issue for us: nvidia/cuda:11.2.2-cudnn8-runtime-ubuntu20.04
Removing the cuda list from the apt sources should do the trick.
So, the following in the most generic case:
rm /etc/apt/sources.list.d/cuda.list && apt-key del 7fa2af80
Note that the exact list name is dependent on the exact repo you added, for example for me it was:
rm /etc/apt/sources.list.d/cuda-ubuntu2004-x86_64.list && apt-key del 7fa2af80
Same issue since yesterday.
$ sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
...
Get:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages [1.127 kB]
Err:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 Packages
File has unexpected size (1127072 != 1126689). Mirror sync in progress? [IP: 152.199.52.179 443]
Hashes of expected file:
- Filesize:1126689 [weak]
- SHA256:7cee2584ca6d97b2f07018ba4f9c3c473fb4e299ed170968a1f8c99c090cc59f
- SHA1:4ee24fac5518a3fcc3702590a0dab32c95484c54 [weak]
- MD5Sum:593faff511765d11055c9919bf2e3bf8 [weak]
Release file created at: Thu, 17 Aug 2023 19:03:05 +0000
...
Fetched 5.931 B in 2s (2.572 B/s)
Reading package lists... Done
E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/Packages.gz File has unexpected size (1127072 != 1126689). Mirror sync in progress? [IP: 152.199.52.179 443]
Hashes of expected file:
- Filesize:1126689 [weak]
- SHA256:7cee2584ca6d97b2f07018ba4f9c3c473fb4e299ed170968a1f8c99c090cc59f
- SHA1:4ee24fac5518a3fcc3702590a0dab32c95484c54 [weak]
- MD5Sum:593faff511765d11055c9919bf2e3bf8 [weak]
Release file created at: Thu, 17 Aug 2023 19:03:05 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.
Ubuntu 20.04.2 LTS.
Same issue persists:
build Prepare to install dependencies 2023-08-18T20:58:25.6841494Z E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/Packages.gz File has unexpected size (1127072 != 1126689). Mirror sync in progress? [IP: 152.195.19.142 443]
build Prepare to install dependencies 2023-08-18T20:58:25.6842455Z Hashes of expected file:
build Prepare to install dependencies 2023-08-18T20:58:25.6843229Z - Filesize:1126689 [weak]
build Prepare to install dependencies 2023-08-18T20:58:25.6843916Z - SHA256:7cee2584ca6d97b2f07018ba4f9c3c473fb4e299ed170968a1f8c99c090cc59f
build Prepare to install dependencies 2023-08-18T20:58:25.6844669Z - SHA1:4ee24fac5518a3fcc3702590a0dab32c95484c54 [weak]
build Prepare to install dependencies 2023-08-18T20:58:25.6845273Z - MD5Sum:593faff511765d11055c9919bf2e3bf8 [weak]
build Prepare to install dependencies 2023-08-18T20:58:25.6845774Z Release file created at: Thu, 17 Aug 2023 19:03:05 +0000
build Prepare to install dependencies 2023-08-18T20:58:25.6846358Z E: Some index files failed to download. They have been ignored, or old ones used instead.
rm /etc/apt/sources.list.d/cuda-ubuntu2004-x86_64.list && apt-key del 7fa2af80
Worked for me.
so beside removing the package list not to be fetched any more, I still do not see any solution to this yet.
According to (Updating the CUDA Linux GPG Repository Key | NVIDIA Technical Blog), the “Solution” here is to “Report CDN issue to NVIDIA”.
So I filed a bug here: https://developer.nvidia.com/nvidia_bug/4248852 in case you want to comment to increase pressure/visibility, but I assume nvidia is already aware of this anyway.
The metadata mismatch issue is now resolved.
Best way to report CDN issue is on GitHub https://github.com/NVIDIA/cuda-repo-management/issues/10