Is there a way to use `nvidia-docker` with the pre...
# ask-community
v
Is there a way to use
nvidia-docker
with the prefect docker agent?
k
Hi @Vincent! The docker agent is responsible for pulling a docker container and running it. You should need to specify the image in the
RunConfig
of the flow. You may want to check this
v
Hi - Thanks for the response. My question is more specifically about enabling a Docker agent to run GPU configured images. Most of the time on a local setting I will use
Copy code
nvidia-docker run -it <image>
which grants access to the use the host GPUs. However is seems that when the docker agent runs a container, the default docker client does not enable utilization of the GPU
k
Oh I see….let me look into thi smore
Seems like you need to get it installed on the image , rather than on the agent side. The agent will pull the image, and the image should be configured to see the GPU. Does that make sense?
v
There are two parts to it. One is starting with a compatible docker image (ie. the nvidia base image) and the second is to have the nvidia runtime in the the host execute the docker image.
k
Ah ok I see what you mean. Will look
Is your docker agent running inside it’s own container?
v
no - my docker agent is running on the host machine.
k
Ok I asked the team and we currently don’t have a configuration for the agent exposed to a different docker client. The best bet might be to configure the
base_url
for the docker client like this , but other than that this is not something we’ve dealt with yet unfortunately.
v
thanks