Kevin
01/04/2024, 12:20 AMNate
01/04/2024, 1:18 AMFROM
some prefect base image of your choosing and then install whichever supporting library based on your worker type
for example, if you wanna run a docker worker, just RUN pip install prefect-docker
on top of the base image and then you should be able to supply that image in your docker-compose with some entrypoint like
prefect worker start -p docker-work-pool
Kevin
01/04/2024, 1:36 AM## Prefect Agent
agent:
image: prefecthq/prefect:2.11.5-python3.11
restart: always
entrypoint: ["/opt/prefect/entrypoint.sh", "prefect", "agent", "start", "-q", "default"]
environment:
- PREFECT_API_URL=<http://server:4200/api>
# Use PREFECT_API_KEY if connecting the agent to Prefect Cloud
# - PREFECT_API_KEY=YOUR_API_KEY
profiles: ["agent"]
but it doesn't bind to default worker queueNate
01/04/2024, 1:51 AMdefault-agent-pool
?Nate
01/04/2024, 1:52 AM["/opt/prefect/entrypoint.sh", "prefect", "agent", "start", "-p", "default-agent-pool"]
Kevin
01/04/2024, 1:52 AMKevin
01/04/2024, 1:52 AMNate
01/04/2024, 1:53 AMNimesh Kumar
03/09/2024, 1:34 PMversion: "3.7"
services:
database:
image: postgres:15.1-alpine
restart: always
container_name: database
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=orion
expose:
- 5432
volumes:
- db:/var/lib/postgresql/data
networks:
- backend
orion:
build: .
container_name: orion
restart: always
environment:
- PREFECT_ORION_API_HOST=0.0.0.0
- PREFECT_ORION_DATABASE_CONNECTION_URL=<postgresql+asyncpg://postgres:postgres@database:5432/orion>
- PREFECT_API_URL=<http://IP:4200/api>
- PREFECT_DB_HOST=database
- PREFECT_DB_PASS=postgres
- PREFECT_DB_PORT=5432
- PREFECT_DB_USER=postgres
ports:
- "4200:4200"
networks:
- backend
agent:
build: .
container_name: agent
restart: always
command: /bin/bash -c "./entrypoint.prod.sh -q algo-3001 -q algo-3002 -q algo-13 -q algo-3003 -q algo-3004 -q algo-3005"
environment:
- INFERENCING_SERVICE_NAME=remote-file-system
- FLOW_BUCKET=inferencing-bucket
- INFRA_TYPE=
- PREFECT_ORION_API_HOST=0.0.0.0
- PREFECT_ORION_DATABASE_CONNECTION_URL=<postgresql+asyncpg://postgres:postgres@database:5432/orion>
- PREFECT_API_URL=<http://192.168.243.24:4200/api>
- PREFECT_DB_HOST=database
- PREFECT_DB_PASS=postgres
- PREFECT_DB_PORT=5432
- PREFECT_DB_USER=postgres
- MINI_BUCKET_NAME=ai-store
- INFERENCE_AUTHENTICATION_TOKEN=b96225fc39544c91b1fd777d460baa6c
volumes:
- tmp:/tmp:rw
- ./flows:/opt/prefect/flows
networks:
- backend
volumes:
db:
tmp:
networks:
backend:
external: true
Will be very helpful if you could share the docker compose of yours🙂ivan
05/07/2024, 1:44 PMNimesh Kumar
05/09/2024, 3:32 AMivan
05/09/2024, 2:13 PM