# ============================================ # Development Dockerfile (faster rebuilds) # ============================================ FROM python:3.11-slim ENV PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ APP_HOME=/app \ PORT=8080 WORKDIR $APP_HOME RUN apt-get update && \ apt-get install -y --no-install-recommends \ libgl1 \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender1 \ curl && \ rm -rf /var/lib/apt/lists/* COPY requirements.txt . # Install CPU-only PyTorch RUN pip install --no-cache-dir \ torch torchvision --index-url https://download.pytorch.org/whl/cpu RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE ${PORT} # Dev mode: uvicorn with reload CMD uvicorn api:app --host 0.0.0.0 --port ${PORT:-8080} --reload