Tomas Moreno
11/01/2023, 6:07 PMMarvin
11/01/2023, 6:07 PMDockerfile
FROM prefecthq/prefect:2-latest
RUN pip install scikit-learn
For more details, you can check the Docker guide from Prefect's documentation.Nate
11/01/2023, 6:08 PMimage
on the ecs work pool is what you'd setNate
11/01/2023, 6:08 PMMarvin
11/01/2023, 6:09 PMTomas Moreno
11/01/2023, 6:09 PMTomas Moreno
11/01/2023, 6:09 PMNate
11/01/2023, 6:13 PMimage
job variable (where job variables ~= "field on a work pool") for each deployment like this
- name: azure-push-check
entrypoint: src/demo_project/healthcheck.py:healthcheck
work_pool:
name: ui-sandbox-worker
job_variables:
image: "myrepo/someimage:latest" # or template in a variable / block / env var
docsTomas Moreno
11/01/2023, 6:17 PMwork_pool:
name: my-ecs-pool
work_queue_name:
job_variables:
image: "{{ build-image.image }}"
but it's still trying to pull the boilerplate docker image. let me dig through a couple other things, I think I might have messed up configuring the work pool initiallyTomas Moreno
11/01/2023, 6:17 PMdeployments:
- name: first_flow
version:
tags: []
description:
entrypoint: flows/flow_elt.py:elt_flow
parameters: {}
work_pool:
name: my-ecs-pool
work_queue_name:
job_variables:
image: "{{ build-image.image }}"
Nate
11/01/2023, 6:17 PMTomas Moreno
11/01/2023, 6:19 PMbuild:
- prefect.deployments.steps.run_shell_script:
id: get-commit-hash
script: git rev-parse --short HEAD
stream_output: false
- prefect.deployments.steps.run_shell_script:
id: ecr-auth-ste
script: /bin/bash -c 'aws ecr get-login-password --region us-west-2 --profile
personal | docker login --username AWS --password-stdin XXX.dkr.ecr.us-west-2.amazonaws.com'
stream_output: true
- prefect_docker.deployments.steps.build_docker_image:
id: build_image
requires: prefect-docker
image_name: XXX.dkr.ecr.us-west-2.amazonaws.com/dwh
tag: '{{ get-commit-hash.stdout }}'
dockerfile: flows/Dockerfile
- prefect_docker.deployments.steps.push_docker_image:
requires: prefect-docker
image_name: XXX.dkr.ecr.us-west-2.amazonaws.com/dwh
tag: '{{ get-commit-hash.stdout }}'
Nate
11/01/2023, 6:21 PMid: build_image
seems like it ought to be
id: build-image
Tomas Moreno
11/01/2023, 6:22 PMTomas Moreno
11/01/2023, 6:22 PMTomas Moreno
11/01/2023, 6:22 PMNate
11/01/2023, 6:22 PMNate
11/01/2023, 6:22 PMNate
11/01/2023, 6:23 PMTomas Moreno
11/01/2023, 6:25 PMTomas Moreno
11/01/2023, 6:28 PMNate
11/01/2023, 6:29 PM