Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't install NodeJS in Darknet Container #34

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions docker/build/cpu-amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
FROM opendatacam/base-desktop-nvidia-cuda-opencv-gstreamer:1.0
FROM ubuntu:20.04 as builder

ENV DEBIAN_FRONTEND noninteractive
LABEL maintainer="OpenDataCam <[email protected]>"

# 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
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/*

# Start Darknet Install
RUN git clone --depth 1 https://github.com/opendatacam/darknet /var/local/darknet
Expand All @@ -20,3 +17,18 @@ 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 -j

# --------------------------------------------------------------------------------------------------

FROM ubuntu:20.04

LABEL maintainer="OpenDataCam <[email protected]>"

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

COPY --from=builder /var/local/darknet /var/local/darknet
7 changes: 0 additions & 7 deletions docker/build/desktop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,4 @@ RUN apt-get update \
&& 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

COPY --from=builder /var/local/darknet /var/local/darknet
7 changes: 0 additions & 7 deletions docker/build/nano/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,4 @@ RUN apt-get update \
&& 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

COPY --from=builder /var/local/darknet /var/local/darknet
7 changes: 0 additions & 7 deletions docker/build/xavier/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,4 @@ RUN apt-get update \
&& 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

COPY --from=builder /var/local/darknet /var/local/darknet