Hello Prefect Community, Great to be here! I am r...
# prefect-community
r
Hello Prefect Community, Great to be here! I am running a flow on prefect2 with a few tasks which have dependencies on local modules. We are running the tasks on a dask cluster and are using a s3 block storage. The issue I run into is recreating the local dependencies on the dask workers. Any suggestions on how you go about ensuring that the script environment is available to the dask worker?
watching 1
m
are your dependencies in the same folder as your flow? Or are these python package dependencies?
r
They are in the same project folder as the flows and get uploaded to s3 bucket when building the deployment. These dependencies are local scripts, not python package dependencies.
my_flow.py
has tasks which uses functions/classes from
my_script1.py
,
my_script2.py
and so-on.
Copy code
project_name/
  internal_dependencies
    my_script1.py
    my_script2.py
    ...
   my_flow.py
@Mike Grabbe can you please opine?
m
Interesting. I am doing something similar, and its been working for me
though I am using in-process flows
I assume youre getting an error that the referened script cannot be found?
r
Yes, I'm getting a similar error. How did you resolve this? @Mike Grabbe What's an in-process flow, can you share any documentation/link?
m
When I deploy the flow, its using the
--infra process
parameter
so the agent itself is running the flow
This shouldnt matter though. Wherever you run the flow, it should load the full set of files from s3
b
Isn’t the agent decoupled from the Dask Runner? Ideally the dask runners should be able to load these dependencies and it shouldn’t matter much if the agents are @Mike Grabbe