-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
89 lines (73 loc) · 2.31 KB
/
Dockerfile
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# docker build -t detrack --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) .
FROM nvcr.io/nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
ENV cwd="/home/"
WORKDIR $cwd
RUN apt-get -y update
# RUN apt-get -y upgrade
RUN apt -y update
RUN apt-get install -y \
software-properties-common \
build-essential \
checkinstall \
cmake \
pkg-config \
yasm \
git \
vim \
curl \
wget \
gfortran \
libjpeg8-dev \
libpng-dev \
libtiff5-dev \
libtiff-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libdc1394-22-dev \
libxine2-dev \
sudo \
apt-transport-https \
libcanberra-gtk-module \
libcanberra-gtk3-module \
dbus-x11 \
vlc \
iputils-ping \
python3-dev \
python3-pip
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata python3-tk
RUN apt-get clean && rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* && apt-get -y autoremove
RUN rm -rf /var/cache/apt/archives/
### APT END ###
ENV TZ=Asia/Singapore
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN python3 -m pip install --no-cache-dir --upgrade pip
COPY requirements.txt requirements.txt
RUN pip3 install --no-cache-dir -r requirements.txt
# install mish_cuda (for ScaledYOLOv4)
RUN cd / && git clone https://github.com/JunnYu/mish-cuda && cd mish-cuda && python3 setup.py build install
RUN pip3 install --no-cache-dir gdown
# install ScaledYOLOv4
RUN cd / && \
git clone https://github.com/yhsmiley/ScaledYOLOv4 && \
cd ScaledYOLOv4 && \
git checkout d9420e432a5aaca9ff50a9c5857aa9f251828126 && \
cd scaledyolov4/weights && \
bash get_weights.sh && \
cd ../.. && \
pip3 install --no-cache-dir -e .
# install DeepSORT
RUN cd / && \
git clone https://github.com/levan92/deep_sort_realtime && \
cd deep_sort_realtime && \
git checkout 012ec4951580bbf844b5cd4536fe57128ed89b64 && \
cd deep_sort_realtime/embedder/weights && \
bash download_tf_wts.sh && \
cd ../../.. && \
pip3 install --no-cache-dir -e .
# minimal Dockerfile which expects to receive build-time arguments, and creates a new user called “user” (put at end of Dockerfile)
ARG USER_ID
ARG GROUP_ID
RUN addgroup --gid $GROUP_ID user
RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user
USER user