fix(AISVC): 修复 Docker Python 版本并添加缺失依赖 [AC-AISVC-01]

- 修改 Dockerfile 使用 Python 3.10.11 替代 3.11

- 添加缺失的 jsonschema 依赖到 pyproject.toml
This commit is contained in:
MerCry 2026-03-11 19:49:04 +08:00
parent 89722f03c7
commit 51d8de0621
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# AI Service Backend Dockerfile
FROM docker.1ms.run/python:3.11-slim AS builder
FROM docker.1ms.run/python:3.10.11-slim AS builder
WORKDIR /app
@ -9,13 +9,13 @@ COPY pyproject.toml README.md ./
RUN uv pip install --system --no-cache-dir .
FROM docker.1ms.run/python:3.11-slim
FROM docker.1ms.run/python:3.10.11-slim
WORKDIR /app
RUN groupadd -r appgroup && useradd -r -g appgroup appuser
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
COPY app ./app

View File

@ -22,6 +22,7 @@ dependencies = [
"pdfplumber>=0.10.0",
"python-multipart>=0.0.6",
"redis>=5.0.0",
"jsonschema>=4.21.0",
]
[project.optional-dependencies]