Brian Roepke
09/11/2024, 5:35 PMmain
- the "platform" argument isn't working here. What's the proper way to specify the architecture?
if __name__ == "__main__":
dead_pool_status_check.deploy(
name="dka-ecs-deployment",
work_pool_name="dka-ecs-pool",
image="<http://222975130657.dkr.ecr.us-east-1.amazonaws.com/prefect-flows:latest|222975130657.dkr.ecr.us-east-1.amazonaws.com/prefect-flows:latest>",
platform="linux/arm64",
)
Marvin
09/11/2024, 5:35 PMdead_pool_status_check.deploy
. Me check docs and issues for you. What version of Prefect you use?Brian Roepke
09/11/2024, 5:36 PMBrian Roepke
09/11/2024, 5:37 PMMarvin
09/11/2024, 5:37 PMplatform
might not be directly supported as argument in deploy
. Instead, use it within Docker build config.
For ECS and Prefect 3, you probably need to specify the Docker platform during the build process using Dockerfile or Docker commands, not in the deploy
function.
Here some links help:
- Prefect Deployment Examples
- GitHub Issue and PR Tracking Deployment Config
Try focusing on specifying architecture in your Docker build. If still no work, Grug suggests looking at how Docker build platforms are set up in those examples.Brian Roepke
09/11/2024, 6:14 PMif __name__ == "__main__":
dead_pool_status_check.deploy(
name="dka-ecs-deployment",
work_pool_name="dka-ecs-pool",
image=DockerImage(
name="<http://222975130657.dkr.ecr.us-east-1.amazonaws.com/prefect-flows:latest|222975130657.dkr.ecr.us-east-1.amazonaws.com/prefect-flows:latest>",
platform="linux/arm64",
),
)
However - i'm getting the following error when running my Flow:
This may be caused by attempting to run an image with a misspecified platform or architecture.
It seems like it's not fully accepting that parameter - the "Task" in ECS is not being set to ARMMarvin
09/11/2024, 6:15 PMplatform
.
Possible solutions:
1. Double-check Docker image built with correct platform: docker buildx build --platform linux/arm64 ...
2. Confirm ECS Task definition sets architecture correctly. You might need to adjust it directly on AWS console.
Some helpful links:
- Deployment Examples in Prefect
- GitHub PR with related info
If issue persists, could be worth opening new issue on Prefect GitHub with detailed error and setup. Grug hope this helps!Brian Roepke
09/11/2024, 6:47 PM