VetNet-LCPS / deploy /docker-compose.lcps.yml
thomasm291678
VetCopilot-LCPS: LCPS 2.0 本地推理引擎替换 DeepSeek API
793e953
Raw History Blame Contribute Delete
2.03 kB
# ============================================================
# VetCopilot-LCPS 联合部署 — Docker Compose
# ============================================================
# 启动:
# docker compose -f docker-compose.lcps.yml up -d
#
# 架构:
# lcps-server (:8000) — Qwen 3B 本地推理
# vetcopilot (:8080) — FastAPI 后端 + React 前端
# ============================================================
services:
# ---- LCPS 推理服务 ----
lcps-server:
build:
context: ../../clinicease4vet
dockerfile: Dockerfile
image: vetnet-lcps:latest
container_name: lcps-server
restart: unless-stopped
ports:
- "8000:8000"
volumes:
# 模型文件必须提前下载到此路径
- ./model/vet-qwen3b-v2-f16.gguf:/app/model/vet-qwen3b-v2-f16.gguf:ro
environment:
- PYTHONUNBUFFERED=1
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 5
start_period: 180s
deploy:
resources:
limits:
memory: 6G
cpus: "4"
# ---- VetCopilot 后端 ----
vetcopilot-backend:
build:
context: ../vetcopilot-backend
dockerfile: ../deploy/Dockerfile.backend
container_name: vetcopilot-backend
restart: unless-stopped
ports:
- "8080:8080"
environment:
- LCPS_API_BASE=http://lcps-server:8000
- LCPS_TIMEOUT=300
- HOST=0.0.0.0
- PORT=8080
depends_on:
lcps-server:
condition: service_healthy
volumes:
- vetcopilot_data:/app/data
# ---- Nginx (前端 + 反向代理) ----
nginx:
image: nginx:alpine
container_name: vetcopilot-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx-site.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- vetcopilot-backend
volumes:
vetcopilot_data: