Skip to content

Commit

Permalink
Create Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jun 19, 2024
1 parent f047b30 commit 2cf20ce
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ARG UBUNTU_TAG
FROM ubuntu:$UBUNTU_TAG

ARG OPENCV_TAG

RUN apt-get update && \
apt-get install -y cmake g++ wget unzip && \
wget -O opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_TAG}.zip && \
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_TAG}.zip && \
unzip opencv.zip && \
unzip opencv_contrib.zip && \
cmake -S opencv-${OPENCV_TAG} -B opencv-${OPENCV_TAG}/build \
-DOPENCV_EXTRA_MODULES_PATH=opencv_contrib-${OPENCV_TAG}/modules \
-DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \
-DOPENCV_ENABLE_NONFREE=ON && \
cmake --build opencv-${OPENCV_TAG}/build -j && \
cmake --install opencv-${OPENCV_TAG}/build && \
rm -rf opencv.zip opencv_contrib.zip opencv-${OPENCV_TAG} opencv_contrib-${OPENCV_TAG} && \
apt-get clean

0 comments on commit 2cf20ce

Please sign in to comment.