David Martin Calalang
07/08/2025, 9:20 PMMarvin
07/08/2025, 9:20 PMMarvin
07/08/2025, 9:20 PMpython
from prefect import flow
from prefect_dask import DaskTaskRunner
@flow(task_runner=DaskTaskRunner(
cluster_kwargs={"dashboard_address": ":8787"} # Specify a fixed port
))
def my_flow():
# your flow code here
pass
This will make the Dask dashboard consistently available on port 8787 while your flow is running.
Remember:
- The Prefect UI (4200) shows your flow runs, logs, and overall orchestration
- The Dask dashboard shows Dask-specific execution metrics and is only available while your flow is running
- Both dashboards are useful but serve different purposes
You can find more details about the Dask integration in the Prefect-Dask documentation.Nate
07/08/2025, 9:20 PMprefect config view
show?Nate
07/08/2025, 9:21 PMDavid Martin Calalang
07/08/2025, 9:22 PMPREFECT_PROFILE='local'
PREFECT_API_URL='<http://127.0.0.1:4200/api>' (from profile)
David Martin Calalang
07/08/2025, 9:24 PMPREFECT_PROFILE='ephemeral'
PREFECT_SERVER_ALLOW_EPHEMERAL_MODE='true' (from profile)
David Martin Calalang
07/08/2025, 9:25 PMDavid Martin Calalang
07/08/2025, 9:28 PMNate
07/08/2025, 9:38 PMPREFECT_API_URL
ought to be set to the address of your prefect server's API, the value of the address being subject to your networking setup
so commonly i run
» docker run -p 4200:4200 --rm -d prefecthq/prefect:3.4.7-python3.12 -- prefect server start --host 0.0.0.0
and then since that's port forwarded to my localhost, this profile setup works
» p config view
🚀 you are connected to:
<http://127.0.0.1:4200>
PREFECT_PROFILE='bleeding'
PREFECT_API_URL='<http://127.0.0.1:4200/api>' (from profile)
David Martin Calalang
07/08/2025, 9:46 PMdocker run --rm -it -v C:/Users/foo/project:/app --workdir //app image:latest bash
David Martin Calalang
07/09/2025, 5:15 PM