update:通过pip来安装markitdown依赖

This commit is contained in:
hrz
2025-05-08 18:23:37 +08:00
parent 297c9e0085
commit be1ff83297
2 changed files with 2 additions and 9 deletions
-8
View File
@@ -3,18 +3,11 @@ FROM python:3.10-slim AS builder
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY main/xiaozhi-server/requirements.txt .
# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt
RUN git clone https://github.com/microsoft/markitdown.git && cd markitdown && pip install -e 'packages/markitdown[all]'
# 第二阶段:生产镜像
FROM python:3.10-slim
@@ -28,7 +21,6 @@ RUN apt-get update && \
# 从构建阶段复制Python包和前端构建产物
COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
COPY --from=builder /app/markitdown/ /app/markitdown/
# 复制应用代码
COPY main/xiaozhi-server .