Hi, I’m trying the new serverless push work pools ...
# prefect-cloud
a
Hi, I’m trying the new serverless push work pools (https://docs.prefect.io/latest/guides/deployment/push-work-pools/#__tabbed_1_1) but it doesn’t seem to detect the work pool type
ecs:push
when running
prefect work-pool create --type ecs:push --provision-infra my-ecs-pool
. My prefect version is 2.14.11
1
w
hmm thats odd, this command works just fine on my machine. can you quick double check the right version is active with
prefect --version
j
Are you logged into/pointed to prefect cloud? I don't see any of work pool types that cloud supports, so I suspect you are pointed to a local/oss server
a
Logging in resolved it, thanks!
w
nice!
a
How do i specify the compute requirements for ecs push? Is it possible to use a gpu instance?
j
I have not done it but I believe you should be able to follow this: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-gpu.html And under edit work pool, under the advanced tab you modify the task run request directly:
🙏 1
a
I see, I’ll try it out. I ran the ecs push script, and I’m trying to deploy the example script
Copy code
from prefect import flow
from prefect.deployments import DeploymentImage

@flow(log_prints=True)            
def my_flow(name: str = "world"):                          
    print(f"Hello {name}! I'm a flow running on ECS!")


if __name__ == "__main__":
    my_flow.deploy(
        name="my-deployment", 
        work_pool_name="my-ecs-pool",
        image=DeploymentImage(                                                 
            name="prefect-flows:latest",
            platform="linux/amd64",
        )                                                                      
    )
However, when I run
python example_deploy_script.py
it just gets stuck on building image. I also attached the stacktrace after force stopping the task, it seems to have trouble in
dockerutils.py:build_image
. Docker is running too
Resolved, just needed to add large files/directorys in
.dockerignore
🙌 2