From 14ea6d100bad727d442a03cd9d7cce4693258e6f Mon Sep 17 00:00:00 2001 From: vsaw Date: Wed, 18 Oct 2023 12:38:13 +0200 Subject: [PATCH 1/2] Updates Desktop to latest Darknet Closes https://github.com/opendatacam/opendatacam/issues/617 --- docker/build/desktop/Dockerfile | 46 ++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/docker/build/desktop/Dockerfile b/docker/build/desktop/Dockerfile index 5950ff6dcdb..999963b62d4 100644 --- a/docker/build/desktop/Dockerfile +++ b/docker/build/desktop/Dockerfile @@ -1,25 +1,41 @@ -FROM opendatacam/base-desktop-nvidia-cuda-opencv-gstreamer:1.0 +FROM nvcr.io/nvidia/cuda:11.4.3-cudnn8-devel-ubuntu20.04 as builder -ENV DEBIAN_FRONTEND noninteractive +LABEL maintainer="OpenDataCam " -# Update NVIDIA Signing key -# See also https://forums.developer.nvidia.com/t/gpg-error-http-developer-download-nvidia-com-compute-cuda-repos-ubuntu1804-x86-64/212904/3 -RUN apt-key del 7fa2af80 && \ - apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/3bf863cc.pub +ENV DEBIAN_FRONTEND noninteractive # Install commonly used dependencies -RUN apt-get update && \ - apt-get install -y jq wget -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ - apt-get install -y nodejs - -# Start Darknet Install -RUN git clone --depth 1 -b odc https://github.com/opendatacam/darknet /var/local/darknet +RUN apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y gnupg2 ca-certificates \ + git build-essential libopencv-dev wget pkg-config \ + && rm -rf /var/lib/apt/lists/* +# Build Darknet +RUN git clone --depth 1 https://github.com/opendatacam/darknet /var/local/darknet WORKDIR /var/local/darknet - RUN sed -i -e s/GPU=0/GPU=1/ Makefile; RUN sed -i -e s/CUDNN=0/CUDNN=1/ Makefile; RUN sed -i -e s/OPENCV=0/OPENCV=1/ Makefile; +RUN make -j + +# -------------------------------------------------------------------------------------------------- + +FROM nvcr.io/nvidia/cuda:11.4.3-cudnn8-runtime-ubuntu20.04 + +LABEL maintainer="OpenDataCam " + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y libopencv-highgui4.2 \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +RUN apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y curl \ + && curl -sL https://deb.nodesource.com/setup_12.x | bash - \ + && apt-get install --no-install-recommends --no-install-suggests -y nodejs \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean -RUN make +COPY --from=builder /var/local/darknet /var/local/darknet From 7b619f7915776eabde24a8daf560386ebd3167a9 Mon Sep 17 00:00:00 2001 From: vsaw Date: Wed, 18 Oct 2023 17:02:23 +0200 Subject: [PATCH 2/2] Build Darknet CPU image from main branch Closes https://github.com/opendatacam/opendatacam/issues/619 --- docker/build/cpu-amd64/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docker/build/cpu-amd64/Dockerfile b/docker/build/cpu-amd64/Dockerfile index ca4b99550fc..e4242745fc8 100644 --- a/docker/build/cpu-amd64/Dockerfile +++ b/docker/build/cpu-amd64/Dockerfile @@ -14,12 +14,9 @@ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ apt-get install -y nodejs # Start Darknet Install -RUN git clone --depth 1 -b odc https://github.com/opendatacam/darknet /var/local/darknet - +RUN git clone --depth 1 https://github.com/opendatacam/darknet /var/local/darknet WORKDIR /var/local/darknet - RUN sed -i -e s/AVX=0/AVX=1/ Makefile; RUN sed -i -e s/OPENMP=0/OPENMP=1/ Makefile; RUN sed -i -e s/OPENCV=0/OPENCV=1/ Makefile; - -RUN make +RUN make -j