Greg Adams
11/02/2021, 7:23 PMAnna Geller
# Use 16 threads
flow.executor = LocalDaskExecutor(scheduler="threads", num_workers=16)
# Use 16 processes
flow.executor = LocalDaskExecutor(scheduler="processes", num_workers=16)
Anna Geller
Anna Geller
from prefect.run_configs import DockerRun
run_config = DockerRun(host_config=dict(cpuset_cpus="0-15"))
more info:
• https://docs.prefect.io/api/latest/run_configs.html#dockerrun
• https://docker-py.readthedocs.io/en/stable/api.html#docker.api.container.ContainerApiMixin.create_host_configKevin Kho
Greg Adams
11/02/2021, 7:55 PMnum_workers
and see if that works betterGreg Adams
11/02/2021, 7:55 PMAnna Geller
num_workers
first, this is likely to fix it already, without any changes on the Docker sideGreg Adams
11/02/2021, 8:10 PMnum_workers
worked. thanks!