Spaces:
Running
Running
# Dockerfile | |
FROM python:3.10-slim | |
ENV PYTHONDONTWRITEBYTECODE=1 \ | |
PYTHONUNBUFFERED=1 | |
WORKDIR /app | |
# 1) Install system deps (for wget/git) and cleanup | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
wget git \ | |
&& rm -rf /var/lib/apt/lists/* | |
# 2) Install Python deps: Gradio + MinerU (magic-pdf full build) | |
# Note: extra-index-url is required for detectron2 wheels | |
RUN pip install --upgrade pip \ | |
&& pip install gradio \ | |
&& pip install -U "magic-pdf[full]" \ | |
--extra-index-url https://wheels.myhloli.com # MinerU package :contentReference[oaicite:2]{index=2} | |
# 3) Download MinerU model weights (script from upstream) | |
RUN wget https://github.com/opendatalab/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py \ | |
&& python download_models_hf.py | |
# 4) Copy application code | |
COPY app.py . | |
EXPOSE 7860 | |
CMD ["python", "app.py"] | |