-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_vision
149 lines (138 loc) · 4.62 KB
/
Dockerfile_vision
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
WORKDIR /bak
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
### func 1: upgrade the system
RUN mv /etc/apt/sources.list.d/cuda.list /etc/apt/sources.list.d/cuda.list.bak &&\
mv /etc/apt/sources.list.d/nvidia-ml.list /etc/apt/sources.list.d/nvidia-ml.list.bak &&\
apt-get update && apt-get upgrade -y && apt-get install -y software-properties-common apt-utils
### func 2: install dependencies
# func 2.1: install system pkgs
RUN apt-get install -y \
build-essential \
bison \
checkinstall \
clang \
cython \
cython3 \
debhelper \
dh-make \
flex \
fuse \
gcc \
git \
g++ \
libblas-dev \
libboost-all-dev \
libcanberra-gtk-module \
libcanberra-gtk3-module \
libelf-dev \
libflann-dev \
libgtk2.0-dev \
libgl1-mesa-dev \
libjsoncpp-dev \
liblapack-dev \
liblua5.2-dev \
libluabind-dev \
libpqxx-dev \
libudev-dev \
libusb-1.0-0 \
libssl-dev \
libxcb1-dev \
libxcomposite-dev \
libxcursor-dev \
libx11-dev \
libzmq3-dev \
make \
openjdk-8-jdk-headless \
pkg-config \
python3-dev \
python3-pip \
python3-venv \
qtbase5-private-dev \
qt5-default \
sl \
wget \
vim \
v4l-utils \
xvfb
RUN sed -i 's/ universe/ universe multiverse/' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y snapcraft
# func 2.2: install common python requirements
RUN pip3 install \
distro \
easydict==1.9 \
fire \
imgaug==0.4.0 \
imageio==2.8.0 \
colorama==0.4.4 \
cycler==0.10.0 \
decorator==4.4.2 \
kiwisolver==1.2.0 \
matplotlib==3.2.1 \
networkx==2.4 \
numpy \
packaging \
pandas \
psutil \
pytest==5.4.1 \
python-dateutil \
Pillow==7.1.1 \
PyWavelets==1.1.1 \
scikit-build \
scikit-image==0.16.2 \
scipy==1.4.1 \
seaborn \
Shapely==1.7.0 \
tensorboardX==2.0 \
termcolor \
torch==1.6.0 \
torchvision==0.7.0 \
tqdm \
pyyaml \
virtualenv \
virtualenvwrapper \
--no-deps
RUN apt-get update && cd /bak/ && wget https://gitlab.com/tjiv/tiev-plus-docker/-/raw/develop/tools/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz &&\
apt-get -y install libtinfo-dev libxml2-dev &&\
mkdir -p /usr/local && cd /usr/local &&\
cp /bak/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz . &&\
tar xvf clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz &&\
mv clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04 llvm-9.0.0
ENV PATH="/usr/local/llvm-9.0.0/bin:${PATH}"
ENV LLVM_CONFIG="/usr/local/llvm-9.0.0/bin/llvm-config"
RUN pip3 install llvmlite==0.33.0 numba
# func 2.3: install CMake
RUN wget https://gitlab.com/tjiv/tiev-plus-docker/-/raw/develop/tools/cmake-3.17.2.tar.gz &&\
tar zvxf cmake-3.17.2.tar.gz && cd cmake-3.17.2 && ./bootstrap &&\
make -j8 && make install &&\
rm -rf cmake*
# func 2.4: Install pybind11
# RUN git clone https://github.com/pybind/pybind11.git &&\
# cd pybind11 && mkdir build && cd build &&\
# cmake .. && cmake --build . --config Release --target check
RUN python3 -m pip install pybind11
# func 2.5: Install OpenCV
# func 2.5: Install OpenCV
COPY ./scripts/install_opencv.sh /bak/install_opencv.sh
RUN wget -P /bak/ https://gitlab.com/tjiv/tiev-plus-docker/-/raw/develop/tools/opencv.zip &&\
wget -P /bak/ https://gitlab.com/tjiv/tiev-plus-docker/-/raw/develop/tools/opencv_contrib.zip &&\
wget -P /bak/ https://gitlab.com/tjiv/tiev-plus-docker/-/raw/develop/tools/No_boostdesc_bgm.i.zip &&\
cd /bak/ && bash install_opencv.sh
### func 3: load && install module
#func 3.1: Install ZCM
COPY ./scripts/install_zcm.sh /bak/scripts/install_zcm.sh
RUN bash /bak/scripts/install_zcm.sh && rm -rf /bak/scripts/install_zcm.sh
# func 3.7: install pylon
WORKDIR /bak/pylon
RUN pip3 install pyparsing &&\
wget -O pylon.deb https://gitlab.com/tjiv/tiev-plus-docker/-/raw/develop/tools/pylon_6.1.1.19861-deb0_amd64.deb &&\
dpkg -i pylon.deb; apt-get install -f &&\
rm -rf pylon.deb &&\
pip3 install git+https://github.com/tjyuyao/bevutils.git@master &&\
wget https://gitlab.com/tjiv/tiev-plus-docker/-/raw/develop/tools/pypylon-1.4.0-cp36-cp36m-linux_x86_64.whl &&\
pip3 install pypylon-1.4.0-cp36-cp36m-linux_x86_64.whl &&\
rm -rf pypylon-1.4.0-cp36-cp36m-linux_x86_64.whl
# func 3.9: Install qt5 for mapper
# ENV QT_QPA_PLATFORM='offscreen'