After we introduced the new way of deploying flows in the Prefect 2.0 General Availability release, many users requested a setup where they don’t need to have a separation between storage and infrastructure blocks and can bake all flow code and module dependencies into a single Docker image.
With this PR, we introduced:
buildCLI and a corresponding
Deployment.build_from_flowallowing you to build and apply the deployment in one step
automatic detection of docker infrastructure + non-remote storage; in this situation, the assumption is that the flow code is baked into the image --a default deployment path for flows is considered to be
/opt/prefect/flowsbut you can fully adjust it using the
Here is an example repository showing how to use that deployment pattern:
This release blog post explains it more: