I have a prefect.yaml file: ```# Generic metadata ...
# ask-community
j
I have a prefect.yaml file:
Copy code
# Generic metadata about this project
name: flows
prefect-version: 2.11.4

# build section allows you to manage and build docker images
build:
  - prefect_docker.deployments.steps.build_docker_image:
      id: "build_image"
      requires: "prefect-docker>=0.3.1"
      image_name: "jb_test"
      tag: "0.0.3"
      dockerfile: "Dockerfile"

deployments:
  - name: "test_default"
    tags:
      - t55
    entrypoint: "flows/set_channel.py:set_channel"
    work_pool: 
      name: jb_test_docker_pool
      job_variables:
        image: "{{ build_image.image }}"
when I attempt to deploy I get a
prefect.exceptions.ScriptError: Script at 'flows/set_channel.py' encountered an exception: ModuleNotFoundError
My Dockerfile has instructions to install modules from a requirements.txt file. I can build the image manually without issue, but when I explicitly put the image name in the deployments section I get the same error.
1
s
in the environment where you’re running
prefect deploy
(locally?), do you have the dependencies in the
requirements.txt
installed?
j
I didn't, but this was in fact the fix. Thank you!
🙌 1
c
I have a question about this. Why is it required for the dependencies to be installed in the environment where you are running the
prefect deploy
command? This environment may just be a runner in a CI/CD pipeline which never actually runs any of the flows?