-
Notifications
You must be signed in to change notification settings - Fork 41
/
Dockerfile.gpu-cv
44 lines (31 loc) · 1.31 KB
/
Dockerfile.gpu-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
44
ARG BASE_IMAGE=nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04
FROM $BASE_IMAGE 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 nvidia/cuda:11.2.2-cudnn8-runtime-ubuntu20.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