FROM python:3.10-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ libgomp1 \ && rm -rf /var/lib/apt/lists/* # Copy requirements COPY requirements.txt requirements-api.txt ./ # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt \ && pip install --no-cache-dir -r requirements-api.txt # Copy application COPY api.py ./ # Expose API port EXPOSE 8000 # Set environment variables ENV HOST=0.0.0.0 ENV PORT=8000 ENV DEFAULT_MODEL=data-matrix # Run the API CMD ["python", "api.py"]