Hey, just reposting here to get a little more visi...
# ask-community
h
Hey, just reposting here to get a little more visibility on an error I posted in a smaller channel https://prefect-community.slack.com/archives/C048K0MGHNK/p1705503150925309
1
k
if you're using a worker, the expectation is that you're not using infra blocks, but instead overriding the work pools default template on a per-deployment basis. I'd start here with using
.deploy
instead of
build_from_flow
. There's an example later on in that guide for setting
job_variables
on your deployment.
Copy code
if __name__ == "__main__":
    get_repo_info.deploy(
        name="my-deployment-never-pull", 
        work_pool_name="my-docker-pool", 
        job_variables={"image_pull_policy": "Never"},
        image="my-image:my-tag"",
        push=False
    )
Valid job variables are any of the items in the
variables
object in your work pool's template on the advanced tab of the work pool edit page.
h
@Kevin Grismore Nate got it working in the linked thread: https://prefect-community.slack.com/archives/C048K0MGHNK/p1705506028522719?thread_ts=1705503150.925309&cid=C048K0MGHNK Thanks for taking a look!
k
sniped by nate as usual 😆 still, definitely check out
.deploy
. You don't need to use
build_from_flow
or infra blocks because the work pool's template is essentially an overridable ECS Task infra block
🙌 1
🤣 1
h
Super, thanks. I'll do some reading into
.deploy
.
🙌 1