- CMakeLists.txt opencv cuda contrib autodetect
- Updated Docker to cuda-11.3+cudnn-8.2.1+TensorRT-8.0.34,Ubuntu to 20.04 and OpenCV to 4.5.4 - Updated OpenCV4 to 4.5.4 in install_OpenCV4.sh - Updated README.md
This commit is contained in:
+16
-16
@@ -1,16 +1,14 @@
|
||||
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
|
||||
FROM nvidia/cuda:11.3.1-devel-ubuntu20.04
|
||||
LABEL maintainer "Francesco Gatti"
|
||||
|
||||
ADD nv-tensorrt-repo-ubuntu1804-cuda10.2-trt7.0.0.11-ga-20191216_1-1_amd64.deb /tmp/trt.deb
|
||||
RUN apt-get update && dpkg -i /tmp/trt.deb && rm /tmp/trt.deb && apt-get update
|
||||
RUN apt install -y libnvinfer7=7.0.0-1+cuda10.2 libnvinfer-dev=7.0.0-1+cuda10.2
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt install -y git wget libeigen3-dev libyaml-cpp-dev
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install libcudnn8-dev=8.2.1.32-1+cuda11.3 libcudnn8=8.2.1.32-1+cuda11.3 libnvinfer-dev=8.0.3-1+cuda11.3 libnvinfer8=8.0.3-1+cuda11.3
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt install -y git wget libeigen3-dev libyaml-cpp-dev gcc-9 g++-9 libopengl-dev libgl-dev
|
||||
RUN cd /tmp && \
|
||||
wget https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-x86_64.sh && \
|
||||
chmod +x cmake-3.17.3-Linux-x86_64.sh && \
|
||||
./cmake-3.17.3-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license && \
|
||||
rm ./cmake-3.17.3-Linux-x86_64.sh
|
||||
|
||||
wget https://github.com/Kitware/CMake/releases/download/v3.21.4/cmake-3.21.4-Linux-x86_64.sh && \
|
||||
chmod +x cmake-3.21.4-Linux-x86_64.sh && \
|
||||
./cmake-3.21.4-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license && \
|
||||
rm ./cmake-3.21.4-Linux-x86_64.sh
|
||||
ENV NVIDIA_VISIBLE_DEVICES all
|
||||
RUN echo "INSTALL OPENCV"
|
||||
RUN apt-get install -y build-essential \
|
||||
unzip \
|
||||
@@ -26,20 +24,21 @@ RUN apt-get install -y build-essential \
|
||||
libx264-dev \
|
||||
libgtk-3-dev \
|
||||
libatlas-base-dev \
|
||||
gfortran \
|
||||
gfortran-9 \
|
||||
libtbb-dev \
|
||||
libgstreamer1.0-dev \
|
||||
libgstreamer-plugins-base1.0-dev \
|
||||
libdc1394-22-dev \
|
||||
libavresample-dev
|
||||
RUN cd && wget https://github.com/opencv/opencv/archive/4.3.0.tar.gz && tar -xf 4.3.0.tar.gz && rm *.tar.gz
|
||||
RUN cd && wget https://github.com/opencv/opencv_contrib/archive/4.3.0.tar.gz && tar -xf 4.3.0.tar.gz && rm *.tar.gz
|
||||
RUN cd && wget https://github.com/opencv/opencv/archive/4.5.4.tar.gz && tar -xf 4.5.4.tar.gz && rm *.tar.gz
|
||||
RUN cd && wget https://github.com/opencv/opencv_contrib/archive/4.5.4.tar.gz && tar -xf 4.5.4.tar.gz && rm *.tar.gz
|
||||
RUN cd && \
|
||||
cd opencv-4.3.0 && mkdir build && cd build && \
|
||||
cd opencv-4.5.4 && mkdir build && cd build && \
|
||||
cmake -D CMAKE_BUILD_TYPE=RELEASE \
|
||||
-D CMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-D INSTALL_PYTHON_EXAMPLES=OFF \
|
||||
-D INSTALL_C_EXAMPLES=OFF \
|
||||
-D OPENCV_EXTRA_MODULES_PATH='~/opencv_contrib-4.3.0/modules' \
|
||||
-D OPENCV_EXTRA_MODULES_PATH='~/opencv_contrib-4.5.4/modules' \
|
||||
-D BUILD_EXAMPLES=OFF \
|
||||
-D WITH_CUDA=ON \
|
||||
-D CUDA_ARCH_BIN=7.2 \
|
||||
@@ -47,6 +46,7 @@ RUN cd && \
|
||||
-D ENABLE_FAST_MATH=ON \
|
||||
-D CUDA_FAST_MATH=ON \
|
||||
-D WITH_CUBLAS=ON \
|
||||
-D WITH_OPENMP=ON \
|
||||
-D WITH_LIBV4L=ON \
|
||||
-D WITH_GSTREAMER=ON \
|
||||
-D WITH_GSTREAMER_0_10=OFF \
|
||||
|
||||
Reference in New Issue
Block a user