<@ULVA73B9P> Can I run workers on Azure Container ...
# ask-marvin
p
@Marvin Can I run workers on Azure Container Instance with the Prefect Cloud Pro service?
m
thought for 203.8 seconds
Yes. In Prefect 3.x you have two ways to run on Azure Container Instances (ACI) with Cloud Pro: 1) Run a polling worker that provisions flow runs on ACI - Worker type:
azure-container-instance
- You can run the worker process itself inside an ACI container (or anywhere that can reach Prefect Cloud). - Steps: - Install the integration:
Copy code
pip install prefect-azure
- Create a work pool:
Copy code
prefect work-pool create "aci-pool" --type azure-container-instance
- Start the worker:
Copy code
prefect worker start --pool aci-pool --type azure-container-instance
- If you run the worker inside ACI, make sure the container image includes
prefect
and
prefect-azure
, and set
PREFECT_API_URL
and
PREFECT_API_KEY
as environment variables. 2) Use a push (serverless) ACI work pool — no worker to run (Cloud Pro feature) - Pool type:
azure-container-instance:push
- Create and auto-provision required Azure resources:
Copy code
pip install prefect-azure
  prefect work-pool create "aci-push" --type azure-container-instance:push --provision-infra
- Prefect Cloud will push flow runs directly to ACI without a polling worker. Helpful docs: - ACI worker guide: Azure Container Instances worker - Serverless/push pools: Serverless (push) work pools - Workers overview: Workers concept - Azure integration SDK: prefect-azure SDK Would you like a quick az CLI example to run the polling worker inside ACI, or do you prefer the push (no-worker) setup?