Dockerfile 887 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ubuntu:22.04

LABEL maintainer="Matteo Spanio"

WORKDIR /app

COPY . ./

RUN apt update && apt install libboost-program-options-dev  git build-essential cmake g++ wget unzip python3 -y

RUN mkdir opencv_source && cd ./opencv_source && wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.4.zip && wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.5.4.zip && unzip opencv.zip && unzip opencv_contrib.zip && mkdir -p build && cd ./build && cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.5.4/modules ../opencv-4.5.4 && make -j4 && make install && cd /app

RUN git clone https://github.com/nlohmann/json.git

RUN cd ./json && mkdir build && cd ./build && cmake .. && make && make install && cd /app

RUN rm -r opencv_source json

RUN cd ./build && cmake .. && make && cd /app

VOLUME [ "/data" ]

CMD [ "python3", "VideoAnalyser.py", "-h" ]