https://prefect.io logo
Title
f

Faheem Khan

07/31/2022, 3:39 AM
Hi all,
prefect deployment build flows/hello.py:hello --name docker-custom --tag dev -sb s3/dev -ib docker-container/docker-custom-image
how do I expose the Port`8787` on docker-custom-image. I have configured volumes, networks on Docker Container block but didn't find any option about ports. I want to access Dask dashboard when I run flows from UI which spin up a separate container of my docker-custom-image.
a

Anna Geller

07/31/2022, 9:04 AM
why would you need to expose a port on the flow run container? not sure I understand -- you would need to do it the other way around, expose the port on your Dask container to see the Dask UI locally
👍 1
f

Faheem Khan

07/31/2022, 10:02 AM
@Anna Geller to my understanding, when I run a flow from UI it launches a seoarate docker container based on the
docker-custom-image
. temproary lacal dask cluster is launched inside the container by default.
Screen snap of the flow container
when running the flow script within server container through python, I can access dask UI as i have exposed the dask port in the prefect server container
my setup :
a

Anna Geller

07/31/2022, 1:27 PM
And where is Dask?
I think the port for the Dask UI is something you need to configure on Dask
Perhaps you should try running everything in a virtual environment first to see how all components work together? That might be easier
k

Khuyen Tran

07/31/2022, 4:24 PM
I think what Faheem wants might be something like this:
docker container run -p 8787:8787
so that he can access the UI outside of the container
👍 1
f

Faheem Khan

08/01/2022, 2:24 AM
@Anna Geller thanks for ur reply @Khuyen Tran exactly,
@flow(task_runner=DaskTaskRunner())
this flow will run by default temporary dask cluster inside the docker container which is started by the flow from UI so I can't expose the port.
https://orion-docs.prefect.io/concepts/infrastructure/ according to this there is no option for the port.