diff --git a/Dockerfile-server b/Dockerfile-server index 86f4d666..7eb77114 100644 --- a/Dockerfile-server +++ b/Dockerfile-server @@ -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 . diff --git a/main/xiaozhi-server/requirements.txt b/main/xiaozhi-server/requirements.txt index 02fbfcdb..0a6b9b75 100755 --- a/main/xiaozhi-server/requirements.txt +++ b/main/xiaozhi-server/requirements.txt @@ -27,4 +27,5 @@ cnlunar==0.2.0 PySocks==1.7.1 dashscope==1.23.1 baidu-aip==4.16.13 -chardet==5.2.0 \ No newline at end of file +chardet==5.2.0 +markitdown==0.1.1 \ No newline at end of file