Is there a clear documented example where a Prefec...
# ask-community
j
Is there a clear documented example where a Prefect Flow is defined in the entrypoint script in a Docker image and that Flow can be invoked/executed from the Prefect UI? All of this running locally.
Maybe this means this not feasible?
Copy code
Flow run 21fa08b2-d272-45e4-a53d-623e11a06971 has a `run_config` of type `DockerRun`, only `LocalRun` is supported
k
Hi @Jay Sundaram, can you tell me a bit more about what you’re trying to do? Are you doing something like this ?
Are you using the DockerAgent? This error seems like a mismatch where you’re using DockerRun with
prefect agent local start
. Is that right?
j
Not quite. Please advise, is there a clear documented example I can look at?
k
Unfortunately, I don’t think we have one. The best advice I have for you is to start your agent like this: https://docs.prefect.io/orchestration/agents/docker.html#agent-configuration
and this whole page about using Prefect default Docker images or supplying your own: https://docs.prefect.io/orchestration/flow_config/docker.html#managing-docker-images
You can use a Prefect base image and supply pip packages here:
Copy code
from prefect.run_configs import DockerRun

flow.run_config = DockerRun(env={"EXTRA_PIP_PACKAGES": "scikit-learn matplotlib"})