bla commited on
Commit
dac1395
·
verified ·
1 Parent(s): 61cfb19

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -14
Dockerfile CHANGED
@@ -3,32 +3,29 @@ FROM python:3.10-slim
3
  WORKDIR /app
4
 
5
  # Install system dependencies
6
- RUN apt-get update && apt-get install -y \
7
-
8
  libglib2.0-0 \
9
  libgomp1 \
 
10
  wget \
 
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  # Copy requirements and install Python dependencies
14
  COPY requirements.txt .
15
- RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # Copy application files
 
18
 
 
 
19
 
 
20
  RUN mkdir -p /content && \
21
- wget -O /content/layout-model.pt "https://huggingface.co/juliozhao/DocLayout-YOLO-DocStructBench-imgsz1280-2501/resolve/main/doclayout_yolo_docstructbench_imgsz1280_2501.pt?download=true"
22
-
23
-
24
- COPY app.py .
25
-
26
- RUN apt-get update && apt-get install -y --no-install-recommends \
27
- libgl1 \
28
- && apt-get clean \
29
- && rm -rf /var/lib/apt/lists/*
30
 
31
- RUN pip install huggingface_hub huggingface
32
  # Download PaddleOCR models manually
33
  RUN mkdir -p /models/det /models/rec /models/cls
34
 
 
3
  WORKDIR /app
4
 
5
  # Install system dependencies
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
 
7
  libglib2.0-0 \
8
  libgomp1 \
9
+ libgl1 \
10
  wget \
11
+ tar \
12
+ && apt-get clean \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  # Copy requirements and install Python dependencies
16
  COPY requirements.txt .
 
17
 
18
+ # Install numpy<2 first to avoid compatibility issues
19
+ RUN pip install --no-cache-dir "numpy<2.0.0"
20
 
21
+ # Install other requirements
22
+ RUN pip install --no-cache-dir -r requirements.txt huggingface_hub
23
 
24
+ # Download DocLayout-YOLO model
25
  RUN mkdir -p /content && \
26
+ wget -O /content/layout-model.pt \
27
+ "https://huggingface.co/juliozhao/DocLayout-YOLO-DocStructBench-imgsz1280-2501/resolve/main/doclayout_yolo_docstructbench_imgsz1280_2501.pt?download=true"
 
 
 
 
 
 
 
28
 
 
29
  # Download PaddleOCR models manually
30
  RUN mkdir -p /models/det /models/rec /models/cls
31