Open jjziets opened 2 years ago
for example: the image is already cashed so it should just return the result within a fraction of a second
This is not the case - if you do a pull on an existing image, it will still issue a GET manifest request to the registry (Hub). This downloads the manifest and compares it to what you currently have. This is because tags are not immutable and are often updated. This ensures you have the latest version of that tag - which you can see when it says "Status: Image is up to date for nvidia/cuda:11.4.0-base"
It takes time to issue the request, go through authentication (even for an anonymous request), download the manifest, and compare the manifest to what currently exists on your machine. If this delay is causing problems and you don't need the latest version of a tag, I would suggest checking whether the image exists on the machine (https://docs.docker.com/engine/reference/commandline/image_ls/) before running the pull command.
You can read more about the pull request flow in the registry API specs here: https://docs.docker.com/registry/spec/api/#pulling-an-image
Would it help to run a mirror/cache on the local lan?
That would mostly cut out the network latency, which seems to be a couple hundred ms for you. Would be easy to test though, just spin up a basic registry container locally and shove a couple images into it, then try pulling from there.
When I run a docker command there is a 3-5sec delay before it returns an answer.
for example: the image is already cashed so it should just return the result within a fraction of a second.
sudo docker pull nvidia/cuda:11.4.0-base
5-second delayThis is on an ASUS X99 WS E with a Intel(R) Xeon(R) CPU E5-4667 v3 @ 2.00GHz and NVME. nothing is running on the system. Network speeds are 1Gbps
Docker version 20.10.16, build aa7e414 lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal