68 lines
1.7 KiB
Docker
68 lines
1.7 KiB
Docker
FROM pytorch/pytorch:2.7.1-cuda12.6-cudnn9-runtime
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV MINERU_MODEL_SOURCE=local
|
|
ENV MINERU_MODEL_DIR=/models
|
|
ENV MINERU_TOOLS_CONFIG_JSON=/root/mineru.json
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
fonts-noto-core \
|
|
fonts-noto-cjk \
|
|
fontconfig \
|
|
libgl1 \
|
|
libglib2.0-0 \
|
|
git \
|
|
&& fc-cache -fv \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN ln -sf "$(command -v python)" /usr/local/bin/python3 && \
|
|
python -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
|
python -m pip install \
|
|
'mineru[core]>=2.7.4' \
|
|
'vllm==0.11.2' \
|
|
'pydantic>=2.12,<3' \
|
|
modelscope \
|
|
magic-pdf \
|
|
boto3 \
|
|
'pdfminer.six>=20251230' \
|
|
pypdfium2 \
|
|
pypdf \
|
|
reportlab \
|
|
pdftext \
|
|
huggingface-hub \
|
|
json-repair \
|
|
fast-langdetect \
|
|
scikit-image \
|
|
openai \
|
|
beautifulsoup4 \
|
|
magika \
|
|
mineru-vl-utils \
|
|
qwen-vl-utils \
|
|
matplotlib \
|
|
ultralytics \
|
|
doclayout_yolo==0.0.4 \
|
|
dill \
|
|
PyYAML \
|
|
ftfy \
|
|
shapely \
|
|
pyclipper \
|
|
omegaconf \
|
|
onnxruntime-gpu \
|
|
python-pptx \
|
|
python-docx \
|
|
openpyxl \
|
|
xlrd \
|
|
xlwt \
|
|
pylatexenc \
|
|
mammoth \
|
|
-i https://mirrors.aliyun.com/pypi/simple && \
|
|
python -m pip cache purge
|
|
|
|
WORKDIR /app
|
|
COPY . .
|
|
COPY docker/entrypoint.mineru-api.sh /usr/local/bin/entrypoint.mineru-api.sh
|
|
RUN chmod +x /usr/local/bin/entrypoint.mineru-api.sh
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.mineru-api.sh"]
|
|
CMD ["mineru-api", "--host", "0.0.0.0", "--port", "8000"]
|