Dockerfile.infer 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # 配置miva推理镜像
  2. # Use L4T base docker
  3. #FROM nvcr.io/nvidia/deepstream-l4t:5.1-21.02-samples
  4. FROM nvcr.io/nvidia/deepstream-l4t:6.0-samples
  5. ARG with_zltoolkit_code=yes
  6. ARG with_opencv_code=yes
  7. # install基础依赖
  8. RUN apt-get update && \
  9. DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgstrtspserver-1.0-dev libx11-dev \
  10. build-essential \
  11. cmake \
  12. libmysqlclient-dev \
  13. libssl-dev
  14. COPY ./3rdparty/ZLToolKit.tar.gz /root
  15. # install zltoolkit
  16. RUN cd /root/ && tar -zxvf ZLToolKit.tar.gz
  17. RUN cp -rf /root/ZLToolKit/lib/* /usr/local/lib/
  18. RUN cp -rf /root/ZLToolKit/include/* /usr/local/include/
  19. #RUN if [ "$with_zltoolkit_code" = "yes" ]; then \
  20. # # apt remove ca-certificates && apt install -y --no-install-recommends apt-utils ca-certificates && \
  21. # cd /root && git clone https://gitee.com/xia-chu/ZLToolKit.git ZLToolKit && \
  22. # cd /root/ZLToolKit && \
  23. # sed -i 's/sudo//g' build_for_linux.sh && ./build_for_linux.sh && \
  24. # rm -rf /root/ZLToolKit; \
  25. # fi
  26. RUN if [ "$with_opencv_code" = "yes" ]; then \
  27. cd /root && git clone -b 4.1.1 https://gitee.com/flay/opencv.git && \
  28. cd /root/opencv && mkdir build && cd /root/opencv/build && \
  29. cmake .. && make -j4 && make install && \
  30. rm -rf /root/opencv; \
  31. fi
  32. WORKDIR /workspace