runner.Dockerfile 684 B

12345678910111213141516171819202122232425262728
  1. FROM python:3.11-slim AS runtime
  2. ENV PYTHONDONTWRITEBYTECODE=1 \
  3. PYTHONUNBUFFERED=1 \
  4. APP_DIR=/app
  5. WORKDIR /app
  6. RUN apt-get update \
  7. && apt-get install --no-install-recommends -y \
  8. gcc \
  9. libc6-dev \
  10. libgomp1 \
  11. linux-libc-dev \
  12. && rm -rf /var/lib/apt/lists/*
  13. COPY requirements.txt ./requirements.txt
  14. RUN pip install --no-cache-dir -r requirements.txt \
  15. && pip uninstall -y alembic \
  16. && apt-get purge -y gcc libc6-dev linux-libc-dev \
  17. && apt-get autoremove -y \
  18. && rm -rf /var/lib/apt/lists/*
  19. COPY app/ ./app/
  20. EXPOSE 5600
  21. CMD ["gunicorn", "--config", "app/runner/gunicorn_config.py", "app.runner.wsgi:application"]