Hello fellow prefect-ers! I'm trying to get Prefec...
# ask-community
m
Hello fellow prefect-ers! I'm trying to get Prefect to use a dynamic Modal worker pool with a Docker image. I have a very simple setup with this Dockerfile, this deploy.yaml and this flow file. I created a modal worker pool with the correct Modal authentication block. When I try to run a deploy job from these files, I can see the worker spin up in Modal, but I consistently get a "directory not found" error (link to full error logs from Modal) I'm really stumped by this. I can do a
git run -it image:tag bash
and see that the directory exists in the image that's being created by this deploy. I feel like I've simplified this as much as I can, to no avail. Has anyone else had any luck with this setup?
j
👋 In your deploy yaml can you try removing the
job_variables
section so it falls back to the image set in your work pool?
or setting it to be
Copy code
job_variables 
  image: {"tag": ..., "aws_secret": ...}
m
trying that now! Will let you know how it goes.
that did it! Once I got the regions set correctly and realized that setting an empty job_variables in my deployment didn't remove existing ones. Thanks so much for the pointer.
🙌 1
j
Great! Yeah the
image
kwarg on a modal work pool seems to be a common thing people trip on, as it's an object to support passing the secret name modal needs, opposed to other work pools where it's just a string. Hopefully we can improve that
🙌 1