File size: 861 Bytes
8d96200
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
services:
  env:
    build: .
    container_name: pr-review-env
    command: uvicorn src.api:app --host 0.0.0.0 --port 7860 --log-level info
    ports:
      - "7860:7860"
    volumes:
      - ./data:/app/data:ro
    networks:
      - pr-net
    healthcheck:
      test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:7860/')\""]
      interval: 5s
      timeout: 3s
      retries: 10

  agent:
    build: .
    container_name: pr-review-agent
    command: python inference.py
    depends_on:
      env:
        condition: service_healthy
    environment:
      ENV_URL: http://env:7860
      MODEL_NAME: ${MODEL_NAME}
      HF_TOKEN: ${HF_TOKEN}
      API_BASE_URL: ${API_BASE_URL:-https://router.huggingface.co/hf-inference/v1}
    networks:
      - pr-net
    restart: "no"

networks:
  pr-net:
    driver: bridge