# Use the official Python image as a base image FROM python:3.9-slim # Install system dependencies for Tesseract OCR and Gradio RUN apt-get update && \ apt-get install -y \ tesseract-ocr \ libtesseract-dev \ libleptonica-dev \ pkg-config \ poppler-utils \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy your Gradio application code into the container COPY . /app WORKDIR /app # Specify the command to run your Gradio app CMD ["python", "app.py"]