# 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"]