Joe Blauer
11/18/2024, 5:20 PMflow.deploy(
name="my-code",
work_pool_name="my-docker-work-pool",
image="my-image:latest",
build=False,
push=False
)
Does this even make sense as an approach?
Assuming it is, the deploy succeeds, but on running the flow, I get:
docker.errors.ImageNotFound: 404 Client Error for http+docker://localhost/v1.47/images/create?tag=latest&fromImage=my-image: Not Found ("pull access denied for my-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied")
I'm running the Prefect server in a local virtual python environment which should have access to my local Mac docker environment.
Is there something I need to do in my docker or work pool configuration to get this to work?
Or am I thinking about it all wrong?
Thanks!will
11/18/2024, 9:25 PMJoe Blauer
11/18/2024, 9:27 PMJoe Blauer
11/18/2024, 10:32 PMdocker run -d -p 5001:5000 --name local-registry registry:2
tag my-image:
docker tag spark-dev localhost:5001/my-image
push my-image to the local registry:
docker push localhost:5001/my-image
My deployment:
flow.deploy(
name="my-code",
work_pool_name="my-docker-work-pool",
image="localhost:5001/my-image:latest",
build=False,
push=False
)
The deployment now appears to be running successfully in that the runs appear to complete, according to their logs and to my local docker, but the print statements are not logging despite @flow(log_prints=True)
and the runs remain in a Pending state.
Progress, but not quite there.
I'll try to simplify my image and go from there...