66 lines
1.8 KiB
Docker
66 lines
1.8 KiB
Docker
FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/corex:4.4.0_torch2.7.1_vllm0.11.2_py3.10
|
|
|
|
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-mesa-glx \
|
|
&& fc-cache -fv \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN python3 -m pip install -U pip -i https://mirrors.aliyun.com/pypi/simple && \
|
|
python3 -m pip install 'mineru[core]>=2.7.4' --no-deps -i https://mirrors.aliyun.com/pypi/simple && \
|
|
python3 -m pip install \
|
|
"numpy==1.26.4" \
|
|
"opencv-python==4.11.0.86" \
|
|
"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 \
|
|
python-pptx \
|
|
python-docx \
|
|
openpyxl \
|
|
xlrd \
|
|
xlwt \
|
|
pylatexenc \
|
|
mammoth \
|
|
-i https://mirrors.aliyun.com/pypi/simple && \
|
|
python3 -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"]
|