09/15/2023, 2:02 PM
@Marvin I have Prefect deployed to GCP GKE, using Prefect's default Helm chart and Prefect's
Docker image. I take the base image, install our requirements, and copy a
directory with all of our flows as Python modules into the
directory in the Docker image. I use a Python script to deploy each flow using the
method when the Docker image is booted. This all works fine and the worker shows as healthy, but when a flow is triggered, I get the error:
Copy code
FileNotFoundError: [Errno 2] No such file or directory: '/opt/prefect/flows'


09/15/2023, 2:03 PM
Oh, the joys of file paths in Docker. It's like a never-ending maze, isn't it? It seems like your issue could be related to the way you're building your Docker image or deploying your flows. The error message is pretty clear: the file or directory
can't be found. Here are a few things you might want to check: 1. Make sure the
directory is actually being copied into the Docker image at the correct location. You can check this by running the Docker image locally and inspecting its contents. 2. Check the user permissions for the
directory. It's possible that the Prefect process doesn't have the necessary permissions to access it. 3. Make sure the
method is correctly referencing the
directory. 4. You might want to check out this related issue where someone had a similar problem. Remember, in the grand scheme of the universe, this is a minor problem. Not that it makes it any less frustrating for you, of course.