-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.R32.3.1.TF1.13.CV4.2.0
180 lines (158 loc) · 4.89 KB
/
Dockerfile.R32.3.1.TF1.13.CV4.2.0
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
FROM nvcr.io/nvidia/l4t-base:r32.3.1
RUN apt-get update && apt-get install -y \
libhdf5-serial-dev \
hdf5-tools \
libhdf5-dev \
zlib1g-dev \
zip \
libjpeg8-dev \
pkg-config
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/aarch64-linux-gnu/hdf5/serial/"
RUN apt-get install -y \
python3-pip
RUN pip3 install -U pip \
testresources \
setuptools
RUN pip3 install -U numpy==1.16.1 \
future==0.17.1 \
mock==3.0.5 \
keras_preprocessing==1.0.5 \
keras_applications==1.0.8 \
gast==0.2.2 \
enum34 \
futures \
protobuf \
h5py==2.9.0
RUN sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 'tensorflow-gpu==1.13.1+nv19.5'
# for opencv
# RUN apt install -y \
# cmake \
# cmake-curses-gui \
# libavformat-dev \
# libavutil-dev \
# libswscale-dev \
# libv4l-dev \
# libeigen3-dev \
# libglew-dev \
# libgtk2.0-dev
# RUN apt install -y \
# libdc1394-22-dev \
# libxine2-dev \
# libgstreamer1.0-dev \
# libgstreamer-plugins-base1.0-dev
# RUN apt install -y \
# libjpeg8-dev \
# libjpeg-turbo8-dev \
# libtiff5-dev \
# # libjasper-dev \
# # libpng12-dev \
# libavcodec-dev
# RUN apt install -y \
# libxvidcore-dev \
# libx264-dev \
# libgtk-3-dev \
# libatlas-base-dev \
# gfortran
# RUN apt install -y \
# libopenblas-dev \
# liblapack-dev \
# liblapacke-dev
# RUN apt install -y \
# qt5-default
# ENV DEBIAN_FRONTEND="noninteractive"
# RUN apt install -y \
# tzdata
# RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
# RUN dpkg-reconfigure --frontend noninteractive tzdata
# RUN apt install -y \
# python3-tk
# RUN pip3 install matplotlib
# # modifications to cuda_gl_interop.h
# RUN ln -sf /usr/lib/aarch64-linux-gnu/tegra/libGL.so /usr/lib/aarch64-linux-gnu/libGL.so
# # Open CV download + make
# RUN mkdir -p /src
# WORKDIR /src
# RUN wget https://github.com/opencv/opencv/archive/3.4.2.zip -O opencv-3.4.2.zip
# RUN unzip opencv-3.4.2.zip
# WORKDIR /src/opencv-3.4.2
# RUN mkdir build
# WORKDIR /src/opencv-3.4.2/build
# RUN cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
# -D WITH_CUDA=ON -D CUDA_ARCH_BIN="6.2" -D CUDA_ARCH_PTX="" \
# -D WITH_CUBLAS=ON -D ENABLE_FAST_MATH=ON -D CUDA_FAST_MATH=ON \
# -D ENABLE_NEON=ON -D WITH_LIBV4L=ON -D BUILD_TESTS=OFF \
# -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF \
# -D WITH_QT=ON -D WITH_OPENGL=ON ..
# RUN make -j4
# RUN make install
RUN apt install -y git
# RUN git clone https://github.com/jasperproject/jasper-client.git jasper && \
# chmod +x jasper/jasper.py && \
# pip install --upgrade setuptools && \
# pip install -r jasper/client/requirements.txt
RUN apt install -y \
libglew-dev \
libtiff5-dev \
zlib1g-dev \
libjpeg-dev \
libpng-dev \
# libjasper-dev \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libpostproc-dev \
libswscale-dev \
libeigen3-dev \
libtbb-dev \
libgtk2.0-dev \
cmake \
pkg-config \
&& apt-get -y clean all
# GStreamer
RUN apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
WORKDIR /tmp
ENV CV_VERSION 4.2.0
RUN wget https://github.com/opencv/opencv/archive/$CV_VERSION.zip -O opencv.zip && \
unzip -q opencv.zip && \
wget https://github.com/opencv/opencv_contrib/archive/$CV_VERSION.zip -O opencv_contrib.zip && \
unzip -q opencv_contrib.zip && \
mkdir opencv-$CV_VERSION/build && \
cd opencv-$CV_VERSION/build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_PNG=OFF \
-DBUILD_TIFF=OFF \
-DBUILD_TBB=OFF \
-DBUILD_JPEG=OFF \
-DBUILD_JASPER=OFF \
-DBUILD_ZLIB=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_opencv_java=OFF \
-DBUILD_opencv_python2=OFF \
-DBUILD_opencv_python3=ON \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-DWITH_OPENCL=OFF \
-DWITH_OPENMP=OFF \
-DWITH_FFMPEG=ON \
-DWITH_GSTREAMER=ON \
-DWITH_GSTREAMER_0_10=OFF \
-DWITH_CUDA=ON \
-DWITH_GTK=ON \
-DWITH_VTK=OFF \
-DWITH_TBB=ON \
-DWITH_1394=OFF \
-DWITH_OPENEXR=OFF \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
-DCUDA_ARCH_BIN=6.2 \
-DCUDA_ARCH_PTX="" \
-DINSTALL_C_EXAMPLES=OFF \
-DINSTALL_TESTS=OFF \
-DOPENCV_EXTRA_MODULES_PATH=/tmp/opencv_contrib-$CV_VERSION/modules .. && \
make -j4 && \
make install && \
rm /tmp/opencv.zip && \
rm /tmp/opencv_contrib.zip && \
rm -r /tmp/opencv-$CV_VERSION && \
rm -r /tmp/opencv_contrib-$CV_VERSION
WORKDIR /