Hi everyone! I am trying to execute a flow on two ...
# prefect-community
p
Hi everyone! I am trying to execute a flow on two different docker containers with different number of CPU cores. Is it possible to dynamically set
num_workers
for LocalDaskExecutor based on the number of cores available on the container?
k
Are you using a task to start the Docker container? Or are you using subflows with
DockerRun
?
p
I am using
DockerRun
.
k
Oh I get what you are saying now. You have one flow but you have two execution environments with different resources. What happens though if you leave it blank?
LocalDaskExecutor()
should infer the number of cores
p
I do not want to use all the cores. Instead, I was hoping to do something like
num_of_cores/2
.
k
You can’t with
LocalDaskExecutor
, but I think you can with
DaskExecutor
using
LocalCluster
like this
p
Gotcha. Would have been great if we could do the same with
LocalDaskExecutor
as well. Thank you Kevin!