Hi, Trying to do a local docker deployment but not...
# ask-community
p
Hi, Trying to do a local docker deployment but not having much luck. Working with prefect 2.14.6. I have created a docker work-pool with my custom image as a tag and I try to deploy my flow I get this message prefect.utilities.dockerutils.BuildError: manifest for prefecthq/prefect:v2.14.6-python3.11 not found: manifest unknown: manifest unknown This is how I am deploying my flow.
Copy code
my_flow.deploy(
        name="my-deployment",
        work_pool_name="doc_test",
        image='myimage:dev'
    )
Two things I do not understand are: 1. Why is it not respecting my image tag that is provided. I set in both the worker and when deploying. 2. Why is it looking for the image with a v before the version? No image tag does match prefecthq/prefect:*v*2.14.6-python3.11. Sure there is a image called prefecthq/prefect:2.14.6-python3.11 Any help would be greatly appreciated. Peter
n
i believe you need to provide your repo/registry in your image, like myrepo/myimage:mytag instead of just myimage:mytag, otherwise it’s unclear where docker is supposed to look
p
I did but just did not share the the full image name and tag. Thanks for the response.
n
can you show your actual .deploy call?
p
Copy code
here it is 
    my_flow.deploy(
        name="my-deployment",
        work_pool_name="doc_test",
        image='personal/myimage:dev'
    )
personal = my personal docker-hub namespace
πŸ‘ 1
n
ok and could you share the stack trace as well?
p
here it is. thanks Traceback (most recent call last): File "/home/peter/git/repo1/ingest_flow_std/flows/my_flow/my_flow.py", line 342, in <module> my_flow.deploy( File "/home/peter/git/repo2/.venv/lib/python3.11/site-packages/prefect/utilities/asyncutils.py", line 255, in coroutine_wrapper return call() ^^^^^^ File "/home/peter/git/repo2/.venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 398, in call return self.result() ^^^^^^^^^^^^^ File "/home/peter/git/repo2/.venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 284, in result return self.future.result(timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/peter/git/repo2/.venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 168, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/home/peter/git/repo2/.venv/lib/python3.11/site-packages/prefect/_internal/concurrency/calls.py", line 355, in _run_async result = await coro ^^^^^^^^^^ File "/home/peter/git/repo2/.venv/lib/python3.11/site-packages/prefect/flows.py", line 969, in deploy deployment_ids = await deploy( ^^^^^^^^^^^^^ File "/home/peter/git/repo2/.venv/lib/python3.11/site-packages/prefect/deployments/runner.py", line 797, in deploy image.build() File "/home/peter/git/repo2/.venv/lib/python3.11/site-packages/prefect/deployments/runner.py", line 671, in build build_image(**build_kwargs) File "/usr/lib/python3.11/contextlib.py", line 81, in inner return func(*args, **kwds) ^^^^^^^^^^^^^^^^^^^ File "/home/peter/git/repo2/.venv/lib/python3.11/site-packages/prefect/utilities/dockerutils.py", line 181, in build_image raise BuildError(event["error"]) prefect.utilities.dockerutils.BuildError: manifest for prefecthq/prefect:v2.14.6-python3.11 not found: manifest unknown: manifest unknown
Noticed a difference between 2.14.5 and 2.14.6 that might be related why it is now looking for an image with v as part of the version πŸ€·β€β™‚οΈ in prefect 2.14.5 when you checked version(
prefect version
) it would return "2.14.5" with prefect 2.14.6 it now returns "v2.14.6" just wanted to share my observation. Not related to why my image is not being used.
n
aha
thank you for that - it does appear that we use the prefect release tag here to select the image tag, which it seems we've accidentally released
v2.14.6
instead of
2.14.6
πŸ™ƒ
ill raise that with the team - really appreciate the callout
p
Back to trying to figure out why my image is not being used.
n
hmm i will try to reproduce that
βœ… 1
s
> thank you for that - it does appear that we use the prefect release tag here to select the image tag, which it seems we've accidentally released
v2.14.6
instead of
2.14.6
πŸ™ƒ I stumbled upon this as well 2 months later πŸ˜• Is this going to be resolved in the next release?
n
hi @Simo Aleksandrov - this should be resolved now what does
prefect version
show for you?
s
Copy code
Version:             v2.14.6
API version:         0.8.4
Python version:      3.11.7
Git commit:          b99932a4
Built:               Wed, Nov 22, 2023 3:19 PM
OS/Arch:             darwin/arm64
Profile:             default
Server type:         cloud
n
gotcha, can you upgrade with
pip install -U prefect
or is that not an option for you?
s
yup, just upgraded, will try again
in my prefect.yaml am I supposed to have this?
Copy code
name: data
prefect-version: v2.14.17
or without the
v
prefix?
n
the version at the top of the
prefect.yaml
is generally just for your own bookkeeping, i dont believe we actually do anything differently based on that
s
right, I see – I thought it is used for the docker image build
n
hm no i think the issue earlier in this thread (if i remember correctly) is that we look at GitHub releases of prefect for the tag, where we erroneously released
2.14.6
with a
v
prefix, a pattern not shared by our docker image tags.
βœ… 1
s
I see, thanks!
n
πŸ‘