release.dockerfile 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. FROM python:3.11-slim as builder
  2. RUN apt-get update && \
  3. DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
  4. apt-get install -y --no-install-recommends \
  5. build-essential \
  6. && rm -rf /var/lib/apt/lists/* \
  7. && apt-get clean
  8. RUN python -m pip install --upgrade pip
  9. RUN python -m pip install --upgrade libsass
  10. FROM python:3.11-slim as release
  11. COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
  12. ARG VERSION
  13. LABEL maintainer="Zauberzeug GmbH <info@zauberzeug.com>"
  14. RUN python -m pip install --upgrade pip
  15. RUN python -m pip install \
  16. nicegui[plotly,matplotlib]==$VERSION \
  17. docutils \
  18. isort \
  19. itsdangerous \
  20. pytest \
  21. requests \
  22. latex2mathml \
  23. selenium
  24. WORKDIR /app
  25. COPY main.py README.md prometheus.py ./
  26. COPY examples ./examples
  27. COPY website ./website
  28. RUN mkdir /resources
  29. COPY docker-entrypoint.sh /resources
  30. RUN chmod 777 /resources/docker-entrypoint.sh
  31. EXPOSE 8080
  32. ENV PYTHONUNBUFFERED True
  33. ENTRYPOINT ["/resources/docker-entrypoint.sh"]
  34. CMD ["python", "main.py"]