22Here is the detailed process of installation of VDMS dependencies.
33
44## Dependencies
5- To install VDMS, we must install the necessary dependencies via apt, github, and pip.
5+ To install VDMS, we must install the necessary dependencies via apt, github, and pip (Python 3.9+) .
66
7- ### Install Debian Packages
8- Here we will install the Debian and Python3 packages.
7+ ### Install Debian/Ubuntu Packages
8+ Here we will install the Debian/Ubuntu packages.
99``` bash
1010sudo apt-get update
1111sudo apt-get install -y --no-install-suggests --no-install-recommends \
1212 apt-transport-https autoconf automake bison build-essential bzip2 ca-certificates \
1313 curl ed flex g++-9 gcc-9 git gnupg-agent javacc libarchive-tools libatlas-base-dev \
1414 libavcodec-dev libavformat-dev libboost-all-dev libbz2-dev libc-ares-dev libcurl4-openssl-dev \
15- libdc1394-22-dev libgflags-dev libgoogle-glog-dev libgtest-dev libgtk-3-dev libgtk2.0-dev \
16- libhdf5-dev libjpeg-dev libjpeg62-turbo-dev libjsoncpp-dev libleveldb-dev liblmdb-dev \
15+ libdc1394-22-dev libgflags-dev libgoogle-glog-dev libgtk-3-dev libgtk2.0-dev \
16+ libhdf5-dev libjpeg-dev libjsoncpp-dev libleveldb-dev liblmdb-dev \
1717 liblz4-dev libopenblas-dev libopenmpi-dev libpng-dev librdkafka-dev libsnappy-dev libssl-dev \
18- libswscale-dev libtbb-dev libtbb2 libtiff-dev libtiff5-dev libtool libzmq3-dev mpich \
18+ libswscale-dev libtbb-dev libtbb2 libtiff-dev libtiff5-dev libtool libzmq3-dev linux-libc-dev mpich \
1919 openjdk-11-jdk-headless pkg-config procps python3-dev python3-pip software-properties-common \
2020 swig unzip uuid-dev
2121```
@@ -25,81 +25,110 @@ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 1
2525update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 1
2626```
2727
28+ #### ** Install JPEG package**
29+ Please install the JPEG package based on the OS platform being used:
30+ * *** Debian 10+:*** ` sudo apt-get install -y libjpeg62-turbo-dev `
31+ * *** Ubuntu 20.04+:*** ` sudo apt-get install -y libjpeg8-dev `
32+ <br >
33+
2834### Install Remaining Dependencies
2935Here we assume ` $VDMS_DEP_DIR ` is the directory for installing additional dependencies.
3036This directory is user-defined but here we use ` /dependencies ` .
3137These instructions assume you have full permissions to your system.
32- If not running as root, add ` sudo ` where necessary .
38+ *** NOTE: *** If running as *** root*** , remove ` sudo ` where applicable .
3339``` bash
3440VDMS_DEP_DIR=/dependencies # Set to any directory
3541BUILD_THREADS=" -j` nproc` "
3642mkdir -p $VDMS_DEP_DIR
3743```
3844
45+
3946#### Python3 Packages
40- Here we will install the necessary Python3 packages Numpy and Protobuf 3.20.3.
47+ Here we will install the necessary Python 3.9+ packages Numpy and Protobuf v24.2.
48+ It is expected that you have Python3.9 or higher installed on your system.
49+ All python calls will use Python3.9+; therefore you may find it convenient to set alias for python.
50+ ``` bash
51+ alias python=/usr/bin/python3
52+ ```
53+ *** NOTE:*** If multiple versions of Python 3 are present on your system, verify you are using Python3.9 or higher. You can specify the specific verison in above command and also set the following with your specific version: ` alias python3=/usr/bin/python3.x ` .
54+
4155You can also install the coverage package if interested in running the Python unit tests.
4256``` bash
43- PROTOBUF_VERSION= " 3.20.3 "
44- pip3 install --no-cache-dir " numpy>=1.25.1" " protobuf== ${PROTOBUF_VERSION} " " coverage>=7.2.7"
57+ python3 -m pip install --upgrade pip
58+ python3 -m pip install --no-cache-dir " numpy>=1.25.1" " coverage>=7.2.7"
4559```
4660
4761
48- #### CMAKE v3.26.4
49- VDMS requires CMake v3.21+. Here we install CMake v3.26.4 .
62+ #### ** CMAKE v3.27.2 **
63+ VDMS requires CMake v3.21+. Here we install CMake v3.27.2 .
5064``` bash
51- CMAKE_VERSION=" v3.26.4 "
65+ CMAKE_VERSION=" v3.27.2 "
5266git clone --branch ${CMAKE_VERSION} https://github.com/Kitware/CMake.git $VDMS_DEP_DIR /CMake
5367cd $VDMS_DEP_DIR /CMake
5468./bootstrap
5569make ${BUILD_THREADS}
56- make install
70+ sudo make install
5771```
5872
59- ### gtest
60- Unfortunately apt doesn't build gtest so you need to do the following:
61- ``` bash
62- cd /usr/src/gtest/
63- cmake .
64- make ${BUILD_THREADS}
65- mv lib/libgtest* /usr/lib
66- ```
6773
68- ### Faiss v1.7.3
74+ #### ** Faiss v1.7.3**
75+ Install the Faiss library for similarity search.
6976``` bash
7077FAISS_VERSION=" v1.7.3"
7178git clone --branch ${FAISS_VERSION} https://github.com/facebookresearch/faiss.git $VDMS_DEP_DIR /faiss
7279cd $VDMS_DEP_DIR /faiss
7380mkdir build && cd build
74- cmake -DFAISS_ENABLE_GPU=OFF ..
81+ cmake -DFAISS_ENABLE_GPU=OFF -DPython_EXECUTABLE=/usr/bin/python3 ..
7582make ${BUILD_THREADS}
76- make install
83+ sudo make install
7784```
7885
79- ### FLINNG
86+
87+ #### ** FLINNG**
88+ Install the Filters to Identify Near-Neighbor Groups (FLINNG) library for similarity search.
8089``` bash
8190git clone https://github.com/tonyzhang617/FLINNG.git $VDMS_DEP_DIR /FLINNG
8291cd $VDMS_DEP_DIR /FLINNG
8392mkdir build && cd build
8493cmake ..
8594make ${BUILD_THREADS}
86- make install
95+ sudo make install
8796```
8897
89- ### Protobuf 3.20.3
98+
99+ #### ** Protobuf v24.2 (4.24.2)**
100+ Install Protobuf (C++ and Python) which requires GoogleTest and Abseil C++ as dependencies.
90101``` bash
91- PROTOBUF_VERSION=" 3.20.3"
92- curl -L -o ${VDMS_DEP_DIR} /${PROTOBUF_VERSION} .tar.gz https://github.com/protocolbuffers/protobuf/archive/refs/tags/v${PROTOBUF_VERSION} .tar.gz
93- cd ${VDMS_DEP_DIR} && tar -xvf ${PROTOBUF_VERSION} .tar.gz
94- cd protobuf-${PROTOBUF_VERSION}
95- ./autogen.sh
96- ./configure
102+ PROTOBUF_VERSION=" 24.2"
103+ git clone -b v${PROTOBUF_VERSION} --recursive https://github.com/protocolbuffers/protobuf.git $VDMS_DEP_DIR /protobuf
104+
105+ cd $VDMS_DEP_DIR /protobuf/third_party/googletest
106+ mkdir build && cd build
107+ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \
108+ -DBUILD_GMOCK=ON -DCMAKE_CXX_STANDARD=17 ..
109+ make ${BUILD_THREADS}
110+ sudo make install
111+ sudo ldconfig
112+
113+ cd $VDMS_DEP_DIR /protobuf/third_party/abseil-cpp
114+ mkdir build && cd build
115+ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/ \
116+ -DABSL_BUILD_TESTING=ON -DABSL_ENABLE_INSTALL=ON -DABSL_USE_EXTERNAL_GOOGLETEST=ON \
117+ -DABSL_FIND_GOOGLETEST=ON -DCMAKE_CXX_STANDARD=17 ..
118+ make ${BUILD_THREADS}
119+ sudo make install
120+
121+ cd $VDMS_DEP_DIR /protobuf
122+ cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=17 \
123+ -Dprotobuf_ABSL_PROVIDER=package -DCMAKE_PREFIX_PATH=/usr/local .
97124make ${BUILD_THREADS}
98- make install
99- ldconfig
125+ sudo make install
126+
127+ python3 -m pip install --no-cache-dir " protobuf==4.${PROTOBUF_VERSION} "
100128```
101129
102- ### [ OpenCV] ( https://opencv.org/ ) 4.5.5
130+
131+ #### ** [ OpenCV] ( https://opencv.org/ ) 4.5.5**
103132Below are instructions for installing *** OpenCV v4.5.5*** .
104133``` bash
105134OPENCV_VERSION=" 4.5.5"
@@ -108,7 +137,7 @@ cd $VDMS_DEP_DIR/opencv
108137mkdir build && cd build
109138cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF ..
110139make ${BUILD_THREADS}
111- make install
140+ sudo make install
112141```
113142
114143** Note** : When using videos, and getting the following error: "Unable to stop the stream: Inappropriate ioctl for device", you may need to include more flags when compiling OpenCV. Follow these instructions ([ source] ( https://stackoverflow.com/questions/41200201/opencv-unable-to-stop-the-stream-inappropriate-ioctl-for-device ) ):
@@ -121,20 +150,21 @@ cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D
121150 -D WITH_V4L=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON \
122151 -DWITH_QT=OFF -DCUDA_NVCC_FLAGS=" -D_FORCE_INLINES" ..
123152make ${BUILD_THREADS}
124- make install
153+ sudo make install
125154```
126155
127- ### Valijson v0.6
128- This is a headers-only library, no compilation/installation necessary
156+
157+ #### ** Valijson v0.6**
158+ This is a headers-only library, no compilation/installation necessary.
129159``` bash
130160VALIJSON_VERSION=" v0.6"
131161git clone --branch ${VALIJSON_VERSION} https://github.com/tristanpenman/valijson.git $VDMS_DEP_DIR /valijson
132162cd $VDMS_DEP_DIR /valijson
133- cp -r include/* /usr/local/include/
163+ sudo cp -r include/* /usr/local/include/
134164```
135165
136166
137- ### [ TileDB] ( https://tiledb.io/ ) 2.14.1
167+ #### ** [ TileDB] ( https://tiledb.io/ ) 2.14.1**
138168The directions below will help you install TileDB v2.14.1 from the source.
139169You can also follow the directions listed [ here] ( https://docs.tiledb.io/en/latest/installation.html ) .
140170``` bash
@@ -146,19 +176,22 @@ cd TileDB-${TILEDB_VERSION}
146176mkdir build && cd build
147177../bootstrap --prefix=/usr/local/
148178make ${BUILD_THREADS}
149- make install-tiledb
179+ sudo make install-tiledb
150180```
151181
152- ### AWS SDK CPP 1.11.0
182+
183+ #### ** AWS SDK CPP 1.11.0**
184+ Use the following instructions to install AWS SDK for C++.
153185``` bash
154186AWS_SDK_VERSION=" 1.11.0"
155187git clone -b ${AWS_SDK_VERSION} --recurse-submodules https://github.com/aws/aws-sdk-cpp ${VDMS_DEP_DIR} /aws-sdk-cpp
156188mkdir -p ${VDMS_DEP_DIR} /aws-sdk-cpp/build
157189cd ${VDMS_DEP_DIR} /aws-sdk-cpp/build
158190cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_ONLY=" s3" -DCUSTOM_MEMORY_MANAGEMENT=OFF
159191make ${BUILD_THREADS}
160- make install
192+ sudo make install
161193```
194+ <br >
162195
163196## Install VDMS
164197This version of VDMS treats PMGD as a submodule so both libraries are compiled at one time. After entering the vdms directory, the command ` git submodule update --init --recursive ` will pull pmgd into the appropriate directory. Furthermore, Cmake is used to compile all directories.
0 commit comments