euler314 commited on
Commit
ff1f350
·
verified ·
1 Parent(s): d4db23d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -16
Dockerfile CHANGED
@@ -1,29 +1,24 @@
1
  # Dockerfile
2
  FROM python:3.10-slim
3
 
 
4
  ENV PYTHONDONTWRITEBYTECODE=1 \
5
  PYTHONUNBUFFERED=1
6
 
7
  WORKDIR /app
8
 
9
- # 1) Install system deps (for wget/git) and cleanup
10
- RUN apt-get update \
11
- && apt-get install -y --no-install-recommends \
12
- wget git \
13
- && rm -rf /var/lib/apt/lists/*
14
 
15
- # 2) Install Python deps: Gradio + MinerU (magic-pdf full build)
16
- # Note: extra-index-url is required for detectron2 wheels
17
- RUN pip install --upgrade pip \
18
- && pip install gradio \
19
- && pip install -U "magic-pdf[full]" \
20
- --extra-index-url https://wheels.myhloli.com # MinerU package :contentReference[oaicite:2]{index=2}
21
 
22
- # 3) Download MinerU model weights (script from upstream)
23
- RUN wget https://github.com/opendatalab/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py \
24
- && python download_models_hf.py
25
-
26
- # 4) Copy application code
27
  COPY app.py .
28
 
29
  EXPOSE 7860
 
1
  # Dockerfile
2
  FROM python:3.10-slim
3
 
4
+ # Prevent .pyc files, unbuffered logging
5
  ENV PYTHONDONTWRITEBYTECODE=1 \
6
  PYTHONUNBUFFERED=1
7
 
8
  WORKDIR /app
9
 
10
+ # Install system deps for OCR (optional)
11
+ RUN apt-get update && \
12
+ apt-get install -y --no-install-recommends \
13
+ tesseract-ocr \
14
+ && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Copy & install Python deps
17
+ COPY requirements.txt .
18
+ RUN pip install --upgrade pip && \
19
+ pip install -r requirements.txt
 
 
20
 
21
+ # Copy application code
 
 
 
 
22
  COPY app.py .
23
 
24
  EXPOSE 7860