Hi folks - is there an example of using multiple s...
# prefect-community
m
Hi folks - is there an example of using multiple script files when executing a flow (that are not part of a python package) ? I am using docker storage, and it seems that one solution is to specify the
files
dictionary and
env_vars
- the docker image is built successfully locally and passes the healthchecks, but when the k8s agent tries to create the prefect job I get
ModuleNotFoundErrors
j
Hi @Marwan Sarieddine for the
files
dictionary of
{src: dest}
are you putting your scripts into a destination where they are importable on the PYTHONPATH?
m
@josh - silly me I had a typo
PYTHON_PATH
instead of
PYTHONPATH
- thanks for asking, made me inspect things
I guess for anyone reading this the
files
dictionary is a mapping of absolute paths on your local machine to paths in your container .. if these script files/modules are not part of a python package, then you’d have to set the
PYTHONPATH
environment variable to the destination directory in the container, to tell python to also search for modules under that path …