Build fails on 2 machines: failed to resolve source metadata for nvcr.io/nvidia/pytorch:20.12-py3

docker build fails with the following error:

[+] Building 10.5s (2/2) FINISHED                                docker:default
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 936B                                       0.0s
 => ERROR [internal] load metadata for nvcr.io/nvidia/pytorch:20.12-py3   10.3s
------
 > [internal] load metadata for nvcr.io/nvidia/pytorch:20.12-py3:
------
Dockerfile:9
--------------------
   7 |     # license agreement from NVIDIA CORPORATION is strictly prohibited.
   8 |     
   9 | >>> FROM nvcr.io/nvidia/pytorch:20.12-py3
  10 |     
  11 |     ENV PYTHONDONTWRITEBYTECODE 1
--------------------
ERROR: failed to solve: nvcr.io/nvidia/pytorch:20.12-py3: failed to resolve source metadata for nvcr.io/nvidia/pytorch:20.12-py3: failed to do request: Head "https://nvcr.io/v2/nvidia/pytorch/manifests/20.12-py3": net/http: TLS handshake timeout

It failed on 2 different machines, at first I though it might be due to proxy issue on one machine. But now I am clueless because second machine doesn’t have any proxy. Any work raound for this? Can i manually pull and continue the build or something? Ubuntu 20.04 machine (Newbie alert)

Have you tried it? ( docker pull nvcr.io/nvidia/pytorch:20.12-py3 )
If it doesn’t work, there is still something in your environment. Even if you tried on two machines if both are in the same environment you can get the same result.

Here

someone also recommends checking the MTU settings.