Created
June 24, 2020 06:12
-
-
Save tani/8e7e33f0d62a305fc4533c36c5536a53 to your computer and use it in GitHub Desktop.
CUDA 10.2, cuDNN 7, Python 3 & 2, JDK 8, OpenCV 4.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 | |
RUN apt-get update \ | |
&& apt-get install -y \ | |
curl \ | |
cmake \ | |
gcc \ | |
g++ \ | |
python-dev \ | |
python-numpy \ | |
python3-dev \ | |
python3-numpy \ | |
default-jdk \ | |
ant \ | |
libtbb-dev \ | |
libeigen3-dev \ | |
libatlas-base-dev \ | |
liblapacke-dev \ | |
libavcodec-dev \ | |
libavformat-dev \ | |
libavresample-dev \ | |
libswscale-dev \ | |
libgstreamer-plugins-base1.0-dev \ | |
libgstreamer1.0-dev \ | |
libpng-dev \ | |
libjpeg-dev \ | |
libopenexr-dev \ | |
libtiff-dev \ | |
libwebp-dev \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
ENV CV_VER=4.3.0 JAVA_HOME=/usr/lib/jvm/default-java | |
RUN curl -fsSL https://github.com/opencv/opencv/archive/${CV_VER}.tar.gz | tar -zxf - \ | |
&& curl -fsSL https://github.com/opencv/opencv_contrib/archive/${CV_VER}.tar.gz | tar -zxf - \ | |
&& mkdir opencv-${CV_VER}/build \ | |
&& cd opencv-${CV_VER}/build \ | |
&& cmake \ | |
-D BUILD_SHARED_LIBS=OFF \ | |
-D CMAKE_BUILD_TYPE=RELEASE \ | |
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-${CV_VER}/modules \ | |
-D EIGEN_INCLUDE_PATH=/usr/include/eigen3 \ | |
-D CUDA_GENERATION=Auto \ | |
-D WITH_CUDA=ON \ | |
-D WITH_CUDNN=ON \ | |
-D WITH_TBB=ON \ | |
.. \ | |
&& make -j 8 \ | |
&& make install \ | |
&& cd ../.. \ | |
&& rm -rf opencv-${CV_VER} opencv_contrib-${CV_VER} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment