tahirsher's picture
Update Dockerfile
f9d2d7a verified
raw
history blame contribute delete
876 Bytes
# Install Tesseract and language packs
RUN apt-get update && apt-get install -y \
tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-urd \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Use an official Python runtime as the base image
FROM python:3.10-slim
# Install system dependencies for Tesseract and OpenCV
RUN apt-get update && apt-get install -y \
tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-urd \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Set the Tesseract data path
ENV TESSDATA_PREFIX=/usr/share/tesseract-ocr/4.00/tessdata
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Expose the port for Streamlit
EXPOSE 8501
# Run the Streamlit app
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]