feat: add news retrieval functionality and register new function

This commit is contained in:
JavaZeroo
2025-05-07 21:15:06 +08:00
parent 63e378524b
commit 1c823c4255
5 changed files with 255 additions and 17 deletions
+8
View File
@@ -3,11 +3,18 @@ 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
@@ -21,6 +28,7 @@ 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 .