sinhala-ocr / Dockerfile
sasmithasarasi's picture
Update Dockerfile
0d7eca5 verified
Raw
History Blame Contribute Delete
686 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies for Debian Trixie (no libgl1-mesa-glx needed)
RUN apt-get update && apt-get install -y \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
wget \
ffmpeg \
libavcodec-extra \
&& rm -rf /var/lib/apt/lists/*
# Install OpenCV dependencies using pip (no system OpenCV needed)
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all application files
COPY . .
# Expose the port
EXPOSE 7860
# Run the Streamlit app
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]