feat: 添加Docker部署配置

Dockerfile: 多阶段构建, CPU版PyTorch, 模型预加载

docker-compose: 健康检查, 数据卷持久化, 环境变量注入

requirements.lock.txt: 锁定依赖版本确保构建可复现
This commit is contained in:
2026-04-18 09:32:58 +08:00
parent 78bf3862ab
commit 4c439d2d7e
4 changed files with 95 additions and 0 deletions

17
requirements.lock.txt Normal file
View File

@@ -0,0 +1,17 @@
# LLM Compass - Docker 锁定依赖 (CPU)
# 使用 CPU 版 PyTorch大幅减小镜像体积
--extra-index-url https://download.pytorch.org/whl/cpu
fastapi==0.136.0
uvicorn[standard]==0.44.0
pydantic==2.12.5
litellm==1.83.9
tiktoken==0.12.0
httpx==0.28.1
python-dotenv==1.0.1
torch==2.2.2+cpu
transformers==4.57.6
tokenizers==0.22.2
safetensors==0.4.3
numpy==1.26.4
sentencepiece==0.2.1
huggingface_hub>=0.28.0