File size: 739 Bytes
42d4c60
 
 
 
 
21d7c29
42d4c60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM python:3.12-slim

# System dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    tesseract-ocr \
    default-jdk \
    poppler-utils \
    libgl1 \
    libglib2.0-0 \
    curl \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Install Python deps (cached layer)
COPY backend/requirements.txt backend/requirements.txt
COPY backend/requirements-pipeline.txt backend/requirements-pipeline.txt
RUN pip install --no-cache-dir \
    -r backend/requirements.txt \
    -r backend/requirements-pipeline.txt \
    huggingface_hub

# Copy source code
COPY backend/ backend/
COPY pdf-script/ pdf-script/
COPY start.sh /start.sh
RUN chmod +x /start.sh

# HF Spaces runs on port 7860
EXPOSE 7860

CMD ["/start.sh"]