fix: 翻译 API 支持 arXiv + HF 两种论文源

This commit is contained in:
2026-06-02 12:30:38 +00:00
parent 06724077c0
commit 7f16e5decf
4 changed files with 44 additions and 24 deletions

View File

@@ -2,9 +2,7 @@ FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
poppler-utils \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 libxext6 libxrender-dev libgomp1 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
@@ -18,8 +16,7 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Pre-download the layout model
RUN python3 -c "from pdf2zh.doclayout import OnnxModel; OnnxModel.from_pretrained()"
LABEL org.opencontainers.image.description="LLM 论文图书馆 + pdf2zh 翻译引擎"
VOLUME ["/app/papers", "/app/data"]
EXPOSE 8000