https://prefect.io logo
r

Richard Hughes

02/18/2022, 8:28 PM
Hi all - if i want to use a python main.py outside of my prefect.py file what is the best way to implement this type of configuration based on usage and deployment? Is there an example somewhere how this ideally should be constructed?
k

Kevin Kho

02/18/2022, 8:42 PM
I’m not quite following. Does main.py run a Flow defined in prefect.py?
r

Richard Hughes

02/18/2022, 8:59 PM
prefect.py runs main.py inside of the flow
k

Kevin Kho

02/18/2022, 9:01 PM
Oh you want to run a Python Flow inside Prefect, or just import some stuff from it?
The safest thing really is to put everything in Docker so that it is all packaged together. And then you can invoke the
ShellTask
and do
python main.py
. You can use DockerStorage and any of DockerRun/KubernetesRun/ECSRun to run the Flow
3 Views