# Build stage FROM python:3.10-slim as builder WORKDIR /app COPY requirements.txt . RUN pip install --user --no-cache-dir -r requirements.txt # Run stage FROM python:3.10-slim WORKDIR /app COPY --from=builder /root/.local /root/.local COPY . . ENV PATH=/root/.local/bin:$PATH ENV PORT=8086 EXPOSE 8086 CMD ["python", "app.py"]