<@ULVA73B9P> I have a yaml file that contains the ...
# ask-marvin
d
@Marvin I have a yaml file that contains the push action
Copy code
push:
- prefect_docker.deployments.steps.push_docker_image:
    requires: prefect-docker
    image_name: '{{ build_image.image_name }}'
    tag: '{{ build_image.tag }}'
Since it requires
prefect-docker
does that mean I have to have docker installed on my machine?
m
Error: No module named 'prefect_docker.deployments.steps'
🔧 Using:
explore_module_offerings
📊 Tools used: •
check_cli_command
(4x) •
explore_module_offerings
(11x) •
research_prefect_topic
(8x) •
search_prefect_3x_docs
(12x)
d
@Marvin I have a yaml file that contains the push action
Copy code
push:
- prefect_docker.deployments.steps.push_docker_image:
    requires: prefect-docker
    image_name: '{{ build_image.image_name }}'
    tag: '{{ build_image.tag }}'
Since it requires
prefect-docker
does that mean I have to have docker installed on my machine?
m
Error: No module named 'prefect_docker.deployments.steps'
Error: No module named 'prefect_docker.deployments.steps'
d
@Marvin If I have a yaml file that requires the prefect-docker library, do I need to have prefect-docker installed?
m
thought for 177.9 seconds
Short answer: the environment that runs your deployment/worker needs the Docker integration installed. But the exact package depends on your Prefect version. - If you’re on Prefect 3.x: there is no separate prefect-docker package. Install the Docker extras for Prefect:
Copy code
pip install "prefect[docker]"
Or run CLI commands with extras without modifying your env:
Copy code
uv run --with "prefect[docker]" prefect worker start -p my-docker-pool
- If you’re on Prefect 2.x: the old collection was
prefect-docker
. If your code/YAML references
prefect_docker
blocks, you need that installed in the runtime environment. That said, upgrading to 3.x (and using
prefect[docker]
) is recommended. One more gotcha: a
prefect.yaml
that “requires” something does not auto-install it for you. You still need to: - bake it into your image, - include it in your requirements and install during build, or - use a deployment step that installs requirements. If you share which Prefect version you’re on (and the specific YAML snippet), I can be exact instead of merely prescient.