William Clark
12/01/2021, 12:29 PMAnna Geller
12/01/2021, 12:34 PMstored_as_script
is that in this configuration you don’t want to build the image during registration, since it has already been built by you and the flow has already been copied into your Docker image. But by default, the storage is always built upon registration. To fix it, you need to explicitly add the flow object to your storage object, and then use build=False
to prevent from building the image on registration:
if __name__ == "__main__":
docker_storage.add_flow(flow)
flow.register(project_name="community", build=False)
The full flow example is available here: https://github.com/anna-geller/packaging-prefect-flows/blob/master/flows_no_build/docker_script_docker_run_local_image.pyWilliam Clark
12/01/2021, 12:38 PM