https://prefect.io logo
Title
a

Aleksandr Glushko

10/06/2021, 3:03 PM
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:
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

Kevin Kho

10/06/2021, 3:09 PM
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

Zanie

10/06/2021, 3:12 PM
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

Aleksandr Glushko

10/06/2021, 3:28 PM
yes, thanks you, would be nice to take a look at it