SMART_KYC_OCR / Dockerfile
gopichandra's picture
Update Dockerfile
daeb81c verified
raw
history blame
879 Bytes
# Use a full Debian-based image with Python
FROM python:3.9-slim
# Set environment variables for non-interactive installs
ENV DEBIAN_FRONTEND=noninteractive
# Install Tesseract and required system dependencies
RUN apt-get update && apt-get install -y \
tesseract-ocr \
libtesseract-dev \
libleptonica-dev \
poppler-utils \
pkg-config \
build-essential \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# (Optional) Add Hindi or other Tesseract language packs if needed:
# RUN apt-get install -y tesseract-ocr-hin tesseract-ocr-eng
# Set working directory
WORKDIR /app
# Copy project files
COPY . .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Set environment PATH explicitly in case PATH issues exist
ENV PATH="/usr/bin/tesseract:${PATH}"
# Default command to run the Gradio app
CMD ["python", "app.py"]