File size: 709 Bytes
f36c047
 
ebacbdf
f36c047
ebacbdf
 
f36c047
 
ebacbdf
 
 
f36c047
 
 
 
 
ebacbdf
 
f36c047
 
ebacbdf
f36c047
 
ebacbdf
f36c047
 
ebacbdf
f36c047
de2414e
ebacbdf
f36c047
de2414e
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
# 1. Base Image
FROM python:3.11-slim

# 2. Set Working Directory
WORKDIR /app

# 3. Install System Dependencies
# ADDED: libgl1 and libglib2.0-0 (Fixes ImportError: libGL.so.1)
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    poppler-utils \
    tesseract-ocr \
    libmagic1 \
    libgl1 \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# 4. Copy Requirements
COPY requirements.txt .

# 5. Install Python Dependencies
RUN pip install --no-cache-dir -r requirements.txt

# 6. Copy Application Code
COPY . .

# 7. Expose Port
EXPOSE 8501

# 8. Run
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0","--server.enableXsrfProtection=false"]