Commit 367edb17 authored by fierval's avatar fierval

current state

parent 9bc751e7
...@@ -44,9 +44,9 @@ include_directories("/usr/local/tensorflow/include/") ...@@ -44,9 +44,9 @@ include_directories("/usr/local/tensorflow/include/")
# IMPORTANT: Protobuf includes. Depends on the anaconda path # IMPORTANT: Protobuf includes. Depends on the anaconda path
# This is Azure DLVM (not sure if DSVM is the same) # This is Azure DLVM (not sure if DSVM is the same)
include_directories("/data/anaconda/envs/py36/lib/python3.6/site-packages/tensorflow/include/") #include_directories("/data/anaconda/envs/py36/lib/python3.6/site-packages/tensorflow/include/")
# This is a standard install of Anaconda with p36 environment # This is a standard install of Anaconda with p36 environment
include_directories("${MYHOME}/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow/include/") #include_directories("${MYHOME}/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow/include/")
target_link_libraries(tf_detector_example target_link_libraries(tf_detector_example
${CUDA_LIBRARIES} ${CUDA_LIBRARIES}
......
FROM fierval/tensorrt:19.02-py3 FROM fierval/tensorrt:19.02-py3
# tensorflow libraries
ADD tensorflow.tar /
# nvcuvid # nvcuvid
ADD nvcuvid/* /usr/local/cuda/targets/x86_64-linux/include/ ADD nvcuvid/* /usr/local/cuda/targets/x86_64-linux/include/
# opencv # opencv
RUN apt-get update RUN apt-get update
RUN apt-get install -y git libgtk2.0-dev curl pkg-config libavcodec-dev \ RUN apt-get install -y git libgtk2.0-dev curl pkg-config autoconf automake libtool libavcodec-dev \
libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev \ libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev \
libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev unzip libcurl4-gnutls-dev zlib1g-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev unzip libcurl4-gnutls-dev zlib1g-dev
...@@ -24,21 +21,22 @@ RUN tar xzvf /cmake-3.13.0.tar.gz -C / \ ...@@ -24,21 +21,22 @@ RUN tar xzvf /cmake-3.13.0.tar.gz -C / \
&& make -j15 \ && make -j15 \
&& make install && make install
# Second: get and build OpenCV 4.0.1 # Second: get and build OpenCV 3.3.1
# #
ADD https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protobuf-cpp-3.6.1.tar.gz /
RUN tar xzvf /protobuf-cpp-3.6.1.tar.gz -C /
RUN cd /protobuf-3.6.1 \
&& ./configure \
&& make -j15 \
&& make install \
&& ldconfig
ADD https://github.com/opencv/opencv_contrib/archive/4.0.1.zip / ADD https://github.com/opencv/opencv_contrib/archive/3.3.1.zip /
RUN unzip -o /4.0.1.zip RUN unzip -o /3.3.1.zip
# && cd opencv-4.0.1/build \
# && cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.0.1/modules/ .. \
# && make -j8 \
# && make install \
# && cd ../.. \
# && rm 4.0.1.zip
ADD https://github.com/opencv/opencv/archive/4.0.1.zip / ADD https://github.com/opencv/opencv/archive/3.3.1.zip /
RUN unzip -o /4.0.1.zip RUN unzip -o /3.3.1.zip
RUN cd /workspace/opencv-4.0.1 \ RUN cd /workspace/opencv-3.3.1 \
&& mkdir build \ && mkdir build \
&& cd build \ && cd build \
&& cmake -DBUILD_TIFF=ON \ && cmake -DBUILD_TIFF=ON \
...@@ -47,16 +45,13 @@ RUN cd /workspace/opencv-4.0.1 \ ...@@ -47,16 +45,13 @@ RUN cd /workspace/opencv-4.0.1 \
-DWITH_CUDA=ON \ -DWITH_CUDA=ON \
-DBUILD_PERF_TESTS=OFF \ -DBUILD_PERF_TESTS=OFF \
-DBUILD_TESTS=OFF \ -DBUILD_TESTS=OFF \
-DBUILD_opencv_codacodec=ON \
# -DENABLE_FAST_MATH=1 \ # -DENABLE_FAST_MATH=1 \
# -DCUDA_FAST_MATH=1 \ # -DCUDA_FAST_MATH=1 \
-DWITH_CUBLAS=1 \ -DWITH_CUBLAS=1 \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
-DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.0.1/modules/ \ -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.3.1/modules/ \
## ##
## Should compile for most card
## 3.5 binary code for devices with compute capability 3.5 and 3.7,
## 5.0 binary code for devices with compute capability 5.0 and 5.2,
## 6.0 binary code for devices with compute capability 6.0 and 6.1,
-DCUDA_ARCH_BIN='7.0' \ -DCUDA_ARCH_BIN='7.0' \
-DCUDA_ARCH_PTX="" \ -DCUDA_ARCH_PTX="" \
## ##
...@@ -76,7 +71,7 @@ RUN cd /workspace/opencv-4.0.1 \ ...@@ -76,7 +71,7 @@ RUN cd /workspace/opencv-4.0.1 \
-DWITH_GDAL=ON \ -DWITH_GDAL=ON \
-DWITH_1394=OFF \ -DWITH_1394=OFF \
-DWITH_FFMPEG=OFF \ -DWITH_FFMPEG=OFF \
-DBUILD_PROTOBUF=OFF \ -DBUILD_PROTOBUF=ON \
-DBUILD_TESTS=OFF \ -DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \ -DBUILD_PERF_TESTS=OFF \
-DBUILD_opencv_xfeatures2d=OFF \ -DBUILD_opencv_xfeatures2d=OFF \
...@@ -85,5 +80,12 @@ RUN cd /workspace/opencv-4.0.1 \ ...@@ -85,5 +80,12 @@ RUN cd /workspace/opencv-4.0.1 \
.. \ .. \
&& make -j15 \ && make -j15 \
&& make install \ && make install \
&& rm /4.0.1.zip \ && rm /3.3.1.zip \
&& rm /cmake-3.13.0.tar.gz && rm /cmake-3.13.0.tar.gz
RUN mkdir fast_od
RUN mkdir /home/boris
# tensorflow libraries
ADD tensorflow.tar /
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment