Spaces:
Sleeping
Sleeping
| # Use the official Python 3.10 image as the base | |
| FROM python:3.10-slim | |
| # Install system dependencies, including Poppler and Tesseract | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| git-lfs \ | |
| ffmpeg \ | |
| libsm6 \ | |
| libxext6 \ | |
| cmake \ | |
| rsync \ | |
| libgl1-mesa-glx \ | |
| tesseract-ocr \ | |
| poppler-utils \ # Poppler for pdf2image | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && git lfs install | |
| # Set the working directory inside the container | |
| WORKDIR /home/user/app | |
| # Copy application files to the container | |
| COPY . /home/user/app | |
| # Install Python dependencies from requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose the port for Streamlit | |
| EXPOSE 8501 | |
| # Command to run the Streamlit app | |
| CMD ["streamlit", "run", "app.py"] | |