I have a Dockerfile
based on nvidia/cuda
like so:
FROM nvidia/cuda:11.0-base
...
I want to be able to build this Dockerfile
on our CI server that does not have a Nvidia GPU. When I try to do that, I get this error:
------
> [1/6] FROM docker.io/nvidia/cuda:11.0-base:
------
failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = failed to build LLB: failed to load cache key: docker.io/nvidia/cuda:11.0-base not found
The error says that the image is not found, but I think this is a bit misleading. I've been able to isolate the problem to whether or not a GPU is present.
When building this Dockerfile
on a server with a Nvidia GPU, I don't get this error. Is it possible to build a Dockerfile
based on an nvidia/cuda
image on a server without a GPU? This would save costs on our CI server.
I plan to deploy the resulting docker container on a server that does have a GPU so, in other words, is it possible to defer the presence of a GPU to run time instead of build time?