Matthew Blau
04/12/2021, 2:44 PMZanie
Zanie
Matthew Blau
04/12/2021, 3:34 PMwith Flow(name="integration",
#schedule=schedule,
#state_handlers=[slack_notifier],
storage = Docker(dockerfile="/home/lookup/integration/Dockerfile",
)) as flow:
and upon each flow run it would use that Dockerfile to build the container and then run the tasks within. That is a pretty expensive process so we had switched to having docker-compose build an image and then create tasks to run the built image. I would like to see a way of building the container once and having tasks contained within the container orchestrated by Prefect.Matthew Blau
04/12/2021, 3:44 PMZanie
DockerRun
run config for your flow that uses the Docker image with all your shared tasks installed.Zanie
Matthew Blau
04/12/2021, 3:57 PMZanie
S3
storage (for example)
• flow.run_config = DockerRun( -> point to the docker image you build with shared tasks)
• Register your flow (build time just has to push to S3)
When you run your flow it will run in your docker container and pull the required flow information from S3