OniiOniiChan/LogisticsDataExtractionValidationSystem
0
1# Use slim Python image to reduce build size2FROM python:3.12-slim3 4# Set working directory5WORKDIR /app6 7# Install system dependencies required for opencv, easyocr, and pdf2image8RUN apt-get update && apt-get install -y --no-install-recommends \9 libgl1 \10 libglib2.0-0 \11 libsm6 \12 libxext6 \13 libxrender1 \14 libgomp1 \15 poppler-utils \16 && rm -rf /var/lib/apt/lists/*17 18# Copy requirements first for better caching19COPY requirements.txt .20 21# Install Python dependencies22# Use --no-cache-dir to reduce image size23# Use --extra-index-url for CPU-only PyTorch24RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt25 26# Copy application code27COPY . .28 29# Expose port (Flask default)30EXPOSE 500031 32# Run the application33CMD ["python", "run.py"]34 35 