Dockerfile 577 B

123456789101112131415161718192021222324252627
  1. FROM debian:10 AS builder
  2. RUN apt-get update \
  3. && apt-get install --yes --no-install-recommends \
  4. g++ \
  5. libpython3-dev \
  6. make \
  7. python3 \
  8. python3-dev \
  9. python3-numpy
  10. ADD Makefile matplotlibcpp.h numpy_flags.py /opt/
  11. ADD examples/*.cpp /opt/examples/
  12. RUN cd /opt \
  13. && make PYTHON_BIN=python3 \
  14. && ls examples/build
  15. FROM debian:10
  16. RUN apt-get update \
  17. && apt-get install --yes --no-install-recommends \
  18. libpython3-dev \
  19. python3-matplotlib \
  20. python3-numpy
  21. COPY --from=builder /opt/examples/build /opt/
  22. RUN cd /opt \
  23. && ls \
  24. && ./basic