File size: 796 Bytes
0f922c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.10-slim

# Install system packages required for OCR (Tesseract, poppler for PDF tools)
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
       tesseract-ocr \
       libtesseract-dev \
       libleptonica-dev \
       pkg-config \
       poppler-utils \
       build-essential \
       git \
    && rm -rf /var/lib/apt/lists/*

# Copy and install Python dependencies
COPY requirements.txt /tmp/requirements.txt
RUN python -m pip install --upgrade pip && \
    pip install --no-cache-dir -r /tmp/requirements.txt

# Copy application
COPY . /app
WORKDIR /app

# Expose default port (Spaces will set PORT env var)
ENV PORT=7860

# Run Streamlit app on container start
CMD bash -lc "streamlit run streamlit_app.py --server.port ${PORT} --server.address 0.0.0.0"