https://prefect.io logo
Title
s

Scott Zelenka

03/30/2020, 4:08 PM
How would you debug a problem with the serialized Flow, after it's been packaged into a Docker storage? I have a Flow that executes fine when running locally, but when I do a
flow.register()
and it gets orchestrated to run in Cloud, it fails with the
result_handler
. I'd like to simulate running the serialized flow within the Docker image it generated locally, to see if I can figure out what's different between that environment and my local machine. Is there a proper way to do this?
j

josh

03/30/2020, 5:14 PM
Hey @Scott Zelenka you can run the flow inside your container with something like this:
from prefect.environments.storage import Docker

flow = Docker().get_flow(flow_location="/root/.prefect/my_flow.prefect")

flow.run()
^ exec’d into the container
👍 1
Side note you can also load the flow with:
from prefect import Flow
f = Flow.load("slug-name-of-flow")
@Marvin archive “Simulate Cloud flow run in Docker storage”