aiinfinite latest code

This commit is contained in:
2026-10-07 17:31:08 +05:30
commit e6cca0fe46
50 changed files with 28776 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# Use an official lightweight Python image
FROM python:3.11-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PORT=5000
# Set working directory
WORKDIR /app
# Install system dependencies
# - poppler-utils: required by pdf2image for PDF processing
# - libgl1 & libglib2.0-0: required for OpenCV and image operations
# - curl: for container healthchecks
RUN apt-get update && apt-get install -y --no-install-recommends \
poppler-utils \
libgl1 \
libglib2.0-0 \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies first (leverages Docker layer cache)
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application source code
COPY . .
# Ensure uploads directory exists
RUN mkdir -p /app/uploads
# Expose port
EXPOSE 5000
# Run with Gunicorn (production WSGI server with timeout suitable for multi-page OCR)
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "3", "--threads", "2", "--timeout", "180", "app:app"]