Kurt Sys (Vintecc)
09/16/2025, 2:03 PMname: prefect.fraio-trigger
prefect-version: 3.4.18
build:
- prefect_docker.deployments.steps.build_docker_image:
id: build_image
requires: prefect-docker>=0.4.5
image_name: "harbor.mgmt.vintecc.cloud/vintecc-ags-hbm/fraio_algo"
tag: "local"
dockerfile: auto
push:
- prefect_docker.deployments.steps.push_docker_image:
requires: prefect-docker>=0.4.5
image_name: '{{ build_image.image_name }}'
tag: '{{ build_image.tag }}'
pull:
- prefect.deployments.steps.set_working_directory:
directory: "/opt/prefect/{{ $REPOSITORY_NAME }}"
deployments:
- name: "fraio-trigger"
version: "local"
tags: []
description: null
schedule: {}
flow_name: "fraio-trigger"
entrypoint: ./fraio_algorithms/fraio_trigger_flow.py:trigger-flow
parameters:
work_pool:
name: fraio
work_queue_name: null
job_variables:
image: '{{ build_image.image }}'
Marvin
09/16/2025, 2:03 PMMarvin
09/16/2025, 2:07 PMpip install "prefect==3.4.18" "prefect-docker>=0.4.5"
Or run CLI commands with extras on demand:
uv run --with 'prefect[docker]' prefect deploy
2) Create the work pool (if it doesn’t exist yet)
- If you’re running this in Docker containers, create a Docker pool:
prefect work-pool create fraio --type docker
- If you’re using Kubernetes instead, use --type kubernetes and make sure your job_variables match that template.
3) Start a worker for the pool
prefect worker start --pool fraio
Add --work-queue if you’re using a specific queue.
4) Deploy from the prefect.yaml
- From the directory containing prefect.yaml:
uv run --with 'prefect[docker]' prefect deploy
Optionally target just one deployment in the file:
uv run --with 'prefect[docker]' prefect deploy --name fraio-trigger
5) Kick off a run (optional)
prefect deployment run fraio-trigger/local --watch
Important notes about your template
- entrypoint must reference a valid Python function name. You have:
./fraio_algorithms/fraio_trigger_flow.py:trigger-flow
That hyphen is not a valid Python identifier. It should be:
./fraio_algorithms/fraio_trigger_flow.py:trigger_flow
- The image reference in job_variables looks right for Docker/Kubernetes pools:
image: '{{ build_image.image }}'
- Make sure you’re authenticated to your registry before deploying so the push step can succeed:
docker login harbor.mgmt.vintecc.cloud
Docs and references
- Prefect 3.x deployments via prefect.yaml: Prefect YAML guide
- Work pools CLI: prefect work-pool CLI
- Workers CLI: prefect worker CLI
- Docker collection (build/push steps): Prefect Docker collection
Want me to validate your entrypoint and pool type are aligned with your runtime? If you confirm whether the ‘fraio’ pool is Docker or Kubernetes, I’ll tailor the job_variables and next steps accordingly.Kurt Sys (Vintecc)
09/16/2025, 2:08 PMMarvin
09/16/2025, 2:09 PMMarvin
09/16/2025, 2:10 PMprefect work-pool create fraio --type docker --overwrite
prefect worker start --pool fraio
prefect deploy --name fraio-trigger
- CLI (Kubernetes pool)
uv run --with 'prefect[kubernetes]' prefect work-pool create fraio --type kubernetes --overwrite
prefect worker start --pool fraio
uv run --with 'prefect[docker]' prefect deploy --name fraio-trigger
You can put those commands in your CI/CD pipeline so the pool is created/updated before each deploy.
Docs:
- Work pools (CLI): prefect work-pool CLI
- Deployments from prefect.yaml: Prefect YAML guide
If you tell me whether your ‘fraio’ pool is Docker or Kubernetes, I’ll give you the exact create command and any job_variables you may want to set.Kurt Sys (Vintecc)
09/16/2025, 2:23 PMprefect.yaml
?Marvin
09/16/2025, 2:23 PMMarvin
09/16/2025, 2:24 PMprefect deploy
at your file with the --prefect-file
flag.
Examples:
prefect deploy --prefect-file ./my_prefect.yml
prefect deploy --prefect-file ./deploy/prefect-deploy.yaml --name fraio-trigger
Tip: since your template uses Docker build/push steps, run with the Docker extra to ensure dependencies are present:
uv run --with 'prefect[docker]' prefect deploy --prefect-file ./deploy/prefect-deploy.yaml
Docs: Prefect YAML guide