Jeff Hale
06/22/2023, 8:03 AMJeff Hale
06/22/2023, 8:03 AMGemma
06/22/2023, 8:43 AMJeff Hale
06/22/2023, 8:53 AMJeff Hale
06/22/2023, 9:14 AMSimon Thompson
06/22/2023, 9:25 AMJovan Sakovic
06/22/2023, 9:39 AMGemma
06/22/2023, 9:55 AMpython -m pip install my_module
it works fine so it’s not pip, but the requirements.txt isn’t being picked up.
# DockerFile
FROM prefecthq/prefect:2.10.16-python3.10
COPY requirements.txt /opt/prefect/prefect_training/requirements.txt
RUN python -m pip install -r requirements.txt
COPY . /opt/prefect/prefect_training/
WORKDIR /opt/prefect/prefect_training/
Mike O'Connor
06/22/2023, 10:23 AMJeff Hale
06/22/2023, 10:39 AMGemma
06/22/2023, 10:52 AMschedule: null
in my deployments, it always asks me ? Would you like to schedule when this flow runs? [y/n] (y):
. Is there a way of permanently disabling this? i.e. say “this is never going to have a schedule”. Using schedule: null
, schedule: false
and schedule: {}
in the deployment yaml don’t work.Niall O'Riordan
06/22/2023, 10:54 AMTaylor Curran
06/22/2023, 11:55 AMincoming-webhook
06/22/2023, 12:04 PMTaylor Curran
06/22/2023, 12:20 PM@flow
def partition_ingestion_unique_pods(dataset_size, start_date, end_date, n_partitions):
date_delta = end_date - start_date
sub_flow()
partition_period = date_delta / n_partitions
for i in range(n_partitions):
end_date = start_date + partition_period
start_date = start_date + partition_period
run_deployment(
deployment="ingest_raw_orders/k8s_deployment",
parameters={
"start_date": start_date,
"end_date": end_date,
"dataset_size": dataset_size,
},
)
Interpreting results from run_deployments:
c = run_deployment("child-flow-c/dep-child-c")
value = c.state.result()
https://github.com/taylor-curran/flow-patterns/blob/main/flows/subflows/task_wrapped_deployments.py#L46ale
06/22/2023, 12:29 PMdockerfile: auto
?
It might be useful for debugging.
Or maybe provide an optional flag to explicitly tell prefect deploy
to keep the fileAdam Stone
06/22/2023, 12:40 PMTaylor Curran
06/22/2023, 12:46 PMTaylor Curran
06/22/2023, 12:53 PMdeployments:
- name: dep-sync-subflows
version: null
tags: [parent, sync]
entrypoint: flows/sync_subflows.py:sync_subflows
schedule: null
work_pool:
name: "my-ecs-workpool"
job_variables:
image: "{{ image_name }}"
Taylor Curran
06/22/2023, 1:28 PMJeff Hale
06/22/2023, 1:55 PMJeff Hale
06/22/2023, 1:55 PMJovan Sakovic
06/22/2023, 1:55 PMecr-login:
aws ecr get-login-password --region ${AWS_REGION} \
| docker login --username AWS \
--password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.<http://amazonaws.com|amazonaws.com>
Taylor Curran
06/22/2023, 1:56 PMDavid Miller
06/22/2023, 1:56 PMGemma
06/22/2023, 2:14 PMbotocore.errorfactory.ClientException: An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Fargate requires task definition to have execution role ARN to support ECR images.
Cong CHen
06/22/2023, 2:34 PMTaylor Curran
06/22/2023, 2:38 PMGemma
06/22/2023, 2:48 PMbuild:
- prefect_docker.deployments.steps.build_docker_image:
id: build_image
requires: prefect-docker>=0.3.0
image_name: <http://724930167716.dkr.ecr.eu-west-2.amazonaws.com/prefect-training-2023|724930167716.dkr.ecr.eu-west-2.amazonaws.com/prefect-training-2023>
tag: 0.0.1
dockerfile: Dockerfile
push: true
platform: linux/amd64