Hi, all! Could anyone advise, how to make the flow...
# prefect-server
a
Hi, all! Could anyone advise, how to make the flow python file stored in GitHub repo, use some packages stored in the same folder? So, for example:
Copy code
github_repo/
├── flow.py
├── flow_dependencies/sub_task.py
how can one
import flow_dependencies.saubtask
in
flow.py
if i use
flow.storage = Git(...)
k
Hey @Aleksandr Glushko, Git storage (and all storages except Docker) only register the Flow file and not the dependencies because of how
cloudpickle
works (does not deep copy modules yet). You would need to package these in a Docker container and then use Git Storage + Docker Run. I have a tutorial for how to do that though if you are interested.
👍 1
z
You could use file sideloading https://docs.prefect.io/orchestration/flow_config/storage.html#loading-additional-files-with-git-storage but it's a little complicated for the module use-case
a
yes, thanks you, would be nice to take a look at it