upi-parser-api / Dockerfile
Tudu-Dev's picture
Docker File Created
a8fa967 verified
raw
history blame
575 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies for OpenCV & EasyOCR
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install Python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Download the OCR model now (so it doesn't download on every request)
RUN python -c "import easyocr; easyocr.Reader(['en'], gpu=False)"
COPY . .
# Start the API with permission for external access
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]