Jeff Baatz
06/30/2021, 8:34 PM--gpus
flag. But setting that flag doesn't seem to be supported. Has anyone run into and implemented anything similar?Kevin Kho
Jeff Baatz
06/30/2021, 8:39 PMKevin Kho
Jeff Baatz
06/30/2021, 8:41 PMJeff Baatz
06/30/2021, 8:41 PMJeff Baatz
06/30/2021, 8:43 PMKevin Kho
Jeff Baatz
06/30/2021, 8:49 PMJeff Baatz
06/30/2021, 8:50 PMKevin Kho
Jeff Baatz
06/30/2021, 9:29 PM/etc/docker/daemon.json
. The docs for the nvidia runtime somewhat indicate that you still need to use the arguments along with docker run
if you do that, but it turns out to not be the case. You can simply set the env variable NVIDIA_VISIBLE_DEVICES in the environment that's running the docker agent.
It might not be an acceptable solution for all since it modifies the default docker behavior, but works for our use case.Kevin Kho
Jeff Baatz
07/01/2021, 9:04 PM[program:prefect-agent-gpu2]
command=prefect agent docker start -l {OUR_LABELS} -f -n {OUR_NAME} -t ${PREFECT_TOKEN} -e CUDA_VISIBLE_DEVICES="0,1" -e NVIDIA_VISIBLE_DEVICES="6,7"
user=supervisor_user
environment=HOME="/home/supervisor_user",USER="supervisor_user",NVIDIA_VISIBLE_DEVICES="6,7"
For us, we're interested in "reserving" two GPUs on an on-prem server for flows. The tricky part here is that this one docker agent will keep spinning up multiple processes without really realizing that the resources aren't sharable. The plan for now is to just give the runner a distinct label that has a flow concurrency cap of 1.Jeff Baatz
07/01/2021, 9:07 PMKevin Kho
Marvin
07/02/2021, 8:57 PM