12/09/2021, 6:24 PM
Hello, when using GitHub based storage is it possible to use other files located on the repo within tasks?
I ask because when I check the temporary directories where I suspect the repo to be cloned it seems no files from the repo exist.
12/09/2021, 6:26 PM
lets you load YAML and SQL files but not Python files. The git based storages clone the repo temporarily, load the Flow, and then delete it.
So this isn’t a mechanism that will work for importing functions from other files
12/13/2021, 11:39 AM
Also stumbled upon this issue
I am bound to have many flows re-using many common tasks and functionalities
what do you recommend (for storage) in these scenarios ?
12/13/2021, 2:42 PM
Docker Storage and install the dependencies in the container. Or you can make a container and use DockerRun to run the Flow on top of a container with the dependencies
12/13/2021, 8:34 PM
suggested! What I ended up doing was creating a parent flow that uses GitPython and the Prefect Docker Tasks:
. This parent flow clones multiple repos that include different model scoring Flows and builds a base image. The dependencies such as a Dockerfile and the requirements.txt file are included in the cloned repositories. After the base image is built it is then pushed to an ECR repository where in sequential flows the ECR repository is passed in as the image_name parameter in the Docker Storage method. Then when the Flow is registered it is done with flow.register(name='Test, build=False) which came from this example
12/14/2021, 8:38 AM
let me try this out !
thanks a lot for the help 🙏