Files
memoryweave/docker-compose.yml
T
xiaowei 2a350cf781 fix(distill): max_tokens 800→1200 — Agnes推理token预算不足
Agnes 2.0-flash是推理模型,推理token占大量预算。
800仍不够→JSON截断(parse error: unexpected end of JSON input)。
1200确保推理+正文都够用。
2026-08-20 01:13:06 +08:00

95 lines
2.7 KiB
YAML

# 织忆 MemoryWeave — Docker Compose 一键部署
# 用法: docker compose up -d
services:
# ── 核心服务 ──────────────────────────────────────
zhiyid:
image: zhiyid:latest
container_name: zhiyid
restart: unless-stopped
ports:
- "7821:7821"
environment:
PORT: 7821
STORAGE_BACKEND: lancedb
SQLITE_PATH: /var/lib/memoryweave/memoryweave.db
GRAPH_PATH: /var/lib/memoryweave/graph.db
LANCEDB_SOCKET: /tmp/zhiyi-ipc.sock
API_KEY: ${API_KEY:-zhiyi-dev-key-2026}
VLLM_ENDPOINT: ${VLLM_ENDPOINT:-http://bge-m3:8000/v1/embeddings}
RERANK_ENDPOINT: ${RERANK_ENDPOINT:-}
LLM_ENDPOINT: ${LLM_ENDPOINT:-}
LLM_MODEL: ${LLM_MODEL:-}
LLM_API_KEY: ${LLM_API_KEY:-}
MOLIFANG_API_KEY: ${MOLIFANG_API_KEY:-}
STATIC_DIR: /app/static
ZHIYI_WEB_UI_ROOT: /app/web-ui/index.html
volumes:
- zhiyi-data:/var/lib/memoryweave
- zhiyi-logs:/home/appuser/.logs
- ./web-ui:/app/web-ui:ro
- ./static:/app/static:ro
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:7821/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- zhiyi-net
# ── Redis(可选,事件流用)──────────────────────────
redis:
image: redis:7-alpine
container_name: zhiyi-redis
restart: unless-stopped
command: redis-server --appendonly yes --maxmemory 256mb
volumes:
- zhiyi-redis:/data
networks:
- zhiyi-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 5s
retries: 3
# ── BGE-M3 Embedding 模型(可选)───────────────────
# 如已有外部 embedding 服务,可注释此节
bge-m3:
image: ghcr.io/ggerganov/llama.cpp:latest
container_name: zhiyi-bge-m3
restart: unless-stopped
entrypoint: []
command: >
python3 -m http.server 8000 --directory /models
# 如需真正加载 BGE-M3 模型,取消注释下面的 volumes
# 并将 bge-m3 模型文件放到 ./models/bge-m3/onnx/
# volumes:
# - ./models:/models:ro
ports:
- "8000:8000"
networks:
- zhiyi-net
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8000/v1/models"]
interval: 60s
timeout: 10s
retries: 3
start_period: 30s
deploy:
resources:
limits:
memory: 4G
networks:
zhiyi-net:
driver: bridge
volumes:
zhiyi-data:
driver: local
zhiyi-logs:
driver: local
zhiyi-redis:
driver: local