Marc Lipoff
04/16/2021, 5:41 PMimport pandas as pd
from prefect.storage.docker import Docker
# ... task definitions
with Flow('test_flow', storage= Docker(
registry_url=ecr_registry_url,
image_name=a_repo_name,
python_dependencies=["python==1.2"])
) as flow:
# ... all the steps
I then to to execute prefect build -p path/to/file.py
and it throws an error that pandas is not installed (which it isnt)
ModuleNotFoundError: No module named 'pandas'
Is there a way to register a flow, without having to install the flow's dependencies first?Kevin Kho
Kevin Kho
Marc Lipoff
04/16/2021, 5:49 PMMarc Lipoff
04/16/2021, 5:50 PMKevin Kho
Kevin Kho
Marc Lipoff
04/16/2021, 6:05 PMKevin Kho
Marc Lipoff
04/16/2021, 6:25 PMKevin Kho
Zanie
try/except ImportErrors
at the top so they can get their flow to register without having the modules available. This is kind of a limitation of Python -- we need to be able to import the flow from that file which requires running the whole file.Kevin Kho
stored_as_script=True
in Docker storage so that the flow doesn’t get serialized.Marc Lipoff
04/16/2021, 6:50 PMMarc Lipoff
04/16/2021, 6:57 PMKevin Kho