image-to-text-ocr / Dockerfile
KZTech's picture
Update Dockerfile
8b1b279 verified
raw
history blame
709 Bytes
# Use an official Python base image
FROM python:3.10-slim
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
libffi-dev \
libpq-dev \
libssl-dev \
curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy dependencies
COPY requirements.txt .
# Install Python packages
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the app code
COPY . .
# Expose Streamlit default port
EXPOSE 8501
# Run Streamlit properly
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]