File size: 1,026 Bytes
68a3a7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# docker-compose.yml
services:
  medi-llm:
    build: .
    image: medi-llm:cpu
    container_name: medi-llm
    ports:
      - "${PORT:-7860}:${PORT:-7860}"
    environment:
      HF_MODEL_REPO: "${HF_MODEL_REPO:-}" # ok if rempty
      HUGGINGFACE_HUB_TOKEN: "${HUGGINGFACE_HUB_TOKEN-}"  # ok if empty
      GRADIO_SERVER_NAME: "0.0.0.0"
      GRADIO_SERVER_PORT: "${PORT:-7860}"
      MPLCONFIGDIR: "/tmp/mpl"
      HF_HOME: "/root/.cache/huggingface"    # inside container
    volumes:
      # Persist CSV/exports to your host (appears in ./exports)
      - ./exports:/data/app/demo/exports
      # Persist uploads to your host (appears in ./uploads)
      - ./uploads:/data/app/demo/uploads
      # Cache models between runs for speed
      - ./hf-cache:/root/.cache/huggingface
      # Live-mount code
      - .:/app
    healthcheck:
      test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:${PORT:-7860}', timeout=2)"]
      interval: 10s
      timeout: 3s
      retries: 5