在docker中使用nvidia/cuda镜像执行apt-get update时报错E: Some index files failed to download. They have been ...

在使用nvidia/cuda:11.4.1-devel-ubuntu20.04镜像创建的容器中,执行apt-get update时报错

Err:8 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64  Packages
  404  Not Found [IP: 60.167.130.133 443]
Fetched 1533 B in 4s (424 B/s)
Reading package lists... Done
E: Failed to fetch https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64/by-hash/SHA256/751939d95516afc289908a19e447f0acc1506367f72ed356431a2b1a469cc8ca  404  Not Found [IP: 60.167.130.133 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.

解决办法,在执行apt-get update前先执行sed -i 's/nvidia\.com/nvidia\.cn/' /etc/apt/sources.list.d/cuda.list命令

你可能感兴趣的:(在docker中使用nvidia/cuda镜像执行apt-get update时报错E: Some index files failed to download. They have been ...)