Tilak Maddy
12/07/2021, 1:21 PMwith Flow(...) as flow:
a = first_task()
b = second_task()
say there are tasks which are defined and imported from other files (which indeed call other tasks and so on..) There is no way I can look at just this main file and tell how the entire flow is gonna look like ? What kind of dependencies all the tasks will have, retries, etc, etc Basically there isn't much info I can get . So what are we doing here ? (and why?)Anna Geller
Anna Geller
How the entire flow is gonna look like ?you can use
flow.visualize()
for thatAnna Geller
Tilak Maddy
12/07/2021, 1:29 PMTilak Maddy
12/07/2021, 1:30 PMTilak Maddy
12/07/2021, 1:30 PMAnna Geller
Anna Geller
Tilak Maddy
12/07/2021, 1:31 PMTilak Maddy
12/07/2021, 1:32 PMAnna Geller
Anna Geller
Tilak Maddy
12/07/2021, 1:33 PMAnna Geller
Anna Geller
Tilak Maddy
12/07/2021, 1:35 PMAnna Geller
Anna Geller
Anna Geller
Tilak Maddy
12/07/2021, 1:38 PMTilak Maddy
12/07/2021, 1:39 PMAnna Geller
Tilak Maddy
12/07/2021, 5:21 PMdocker_storage = Docker(
image_name="community",
image_tag="latest",
dockerfile="/Users/anna/repos/packaging-prefect-flows/Dockerfile",
)
Hey @Anna Geller , I want to know if it is possible for it to pull from DockerHub and second question - how does it know where all the files are in the Docker Image ? Like I would have mine at /app/flow.py and some of the @task functions that it calls would be imported from say /app/mini_tasks.pyAnna Geller
Tilak Maddy
12/07/2021, 5:27 PMi~t can be pushed to Dockerhub~ Prefect will be pulling the image during flow run1. @Anna Geller Show me how I can make it . I have a docker image in the hub but what arguments do I pass? "Docker('user/repo:tag')"?
the flow is pickled on top of your image during registration2. I don't understand what that means(and I know you know that too 😉), but I am gonna try it whatever and will get back to you
Anna Geller
from prefect.storage import Docker
Docker(
image_name="<http://gcr.io/prefect-community/demos/community|gcr.io/prefect-community/demos/community>",
image_tag="latest",
python_dependencies=["pandas", "scikit-learn"],
)
or:
from prefect.storage import Docker
Docker(
image_name="<http://gcr.io/prefect-community/demos/community|gcr.io/prefect-community/demos/community>",
image_tag="latest",
dockerfile="/path/to/Dockerfile",
)
Tilak Maddy
12/07/2021, 5:45 PMDocker(
image_name="<http://gcr.io/prefect-community/demos/community|gcr.io/prefect-community/demos/community>",
image_tag="latest",
dockerfile="/path/to/Dockerfile",
)
@Anna Geller doubt - If it can pull the image from docker hub then why does it need path to dockerfile ?Tilak Maddy
12/07/2021, 5:46 PMAnna Geller