triflix commited on
Commit
cb997d4
·
verified ·
1 Parent(s): 87014b3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -1,9 +1,10 @@
1
- FROM python:3.10-slim
 
2
 
3
  # Set working directory
4
  WORKDIR /app
5
 
6
- # Install system dependencies for PaddleOCR and pdf2image
7
  RUN apt-get update && apt-get install -y \
8
  libgomp1 \
9
  libglib2.0-0 \
@@ -14,16 +15,15 @@ RUN apt-get update && apt-get install -y \
14
  poppler-utils \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Copy requirements
18
  COPY requirements.txt .
19
 
20
  # Install Python dependencies
21
- RUN pip install --no-cache-dir --upgrade pip && \
22
- pip install --no-cache-dir paddlepaddle==3.0.0 && \
23
  python -m pip install --no-cache-dir paddleocr && \
24
  pip install --no-cache-dir -r requirements.txt
25
 
26
- # Copy application
27
  COPY app.py .
28
 
29
  # Expose port (HuggingFace Spaces uses 7860)
 
1
+ # Use Python 3.9 slim image for smaller size
2
+ FROM python:3.9-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  libgomp1 \
10
  libglib2.0-0 \
 
15
  poppler-utils \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Copy requirements first (for better caching)
19
  COPY requirements.txt .
20
 
21
  # Install Python dependencies
22
+ RUN pip install --no-cache-dir paddlepaddle==3.0.0 && \
 
23
  python -m pip install --no-cache-dir paddleocr && \
24
  pip install --no-cache-dir -r requirements.txt
25
 
26
+ # Copy application code
27
  COPY app.py .
28
 
29
  # Expose port (HuggingFace Spaces uses 7860)