<@ULVA73B9P> Is it possible to override job variab...
# ask-marvin
r
@Marvin Is it possible to override job variables using
run_deployment
?
m
Yes, it is possible to override job variables using
run-deployment
. The
job_variables
parameter allows you to fine-tune the infrastructure settings for a deployment. These values will override default values in the specified work pool's base job template. You can override environment variables, such as
image_pull_policy
and
image
, specifically for a deployment with the
job_variables
argument. Here is an example code snippet from the Prefect documentation:
Copy code
python
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
    )
For more details, you can refer to the guidance on deploying with Prefect.