-
Notifications
You must be signed in to change notification settings - Fork 41
/
Dockerfile.cpu-cv
43 lines (30 loc) · 1.22 KB
/
Dockerfile.cpu-cv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM ubuntu:20.04 AS builder
LABEL maintainer="Daisuke Kobayashi <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg2 ca-certificates \
git build-essential libopencv-dev \
&& rm -rf /var/lib/apt/lists/*
COPY configure.sh /tmp/
ARG SOURCE_BRANCH=unspecified
ENV SOURCE_BRANCH $SOURCE_BRANCH
ARG SOURCE_COMMIT=unspecified
ENV SOURCE_COMMIT $SOURCE_COMMIT
ARG CONFIG
RUN git clone https://github.com/AlexeyAB/darknet.git && cd darknet \
&& git checkout $SOURCE_BRANCH \
&& git reset --hard $SOURCE_COMMIT \
&& /tmp/configure.sh $CONFIG && make \
&& cp darknet /usr/local/bin \
&& cd .. && rm -rf darknet
FROM ubuntu:20.04
LABEL maintainer="Daisuke Kobayashi <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
ARG SOURCE_BRANCH=unspecified
ENV SOURCE_BRANCH $SOURCE_BRANCH
ARG SOURCE_COMMIT=unspecified
ENV SOURCE_COMMIT $SOURCE_COMMIT
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y libopencv-highgui4.2 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/bin/darknet /usr/local/bin/darknet