forked from AlexeyAB/darknet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gpu
47 lines (24 loc) · 834 Bytes
/
Dockerfile.gpu
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
45
46
47
FROM nvidia/cuda:11.6.0-cudnn8-devel-ubuntu20.04 AS builder
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y
RUN apt-get install -y g++ make pkg-config libopencv-dev
COPY . /darknet
WORKDIR /darknet
RUN rm Dockerfile.cpu
RUN rm Dockerfile.gpu
RUN rm docker-compose.yml
RUN make
FROM nvidia/cuda:11.6.1-cudnn8-devel-ubuntu20.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y
RUN apt-get install -y sudo libgomp1
RUN useradd -U -m yolo
RUN usermod -aG sudo yolo
RUN usermod --shell /bin/bash yolo
RUN echo "yolo:yolo" | chpasswd
COPY --from=builder /darknet /home/yolo/darknet
RUN cp /home/yolo/darknet/libdarknet.so /usr/local/lib/libdarknet.so || echo "libso not used"
RUN cp /home/yolo/darknet/include/darknet.h /usr/local/include/darknet.h
RUN ldconfig
WORKDIR /home/yolo/darknet
USER yolo