22Here is the detailed process of installation of VDMS dependencies.
33
44## Dependencies
5- Here we will install the Ubuntu 20.04 and Python3 packages. We assume ` python ` /` pip ` is an alias for ` python3 ` /` pip3 ` . If your system has both Python 2 and Python 3, please replace all pip and python commands with pip3 and python3, respectively.
5+ To install VDMS, we must install the necessary dependencies via apt, github, and pip.
6+
7+ ### Install Debian Packages
8+ Here we will install the Debian and Python3 packages.
69``` bash
710sudo apt-get update
8- sudo apt-get -y install --no-install-recommends software-properties-common
9- sudo add-apt-repository " deb http://security.ubuntu.com/ubuntu focal-security main"
10- sudo apt-get -y install --no-install-recommends apt-transport-https autoconf automake bison build-essential \
11- bzip2 ca-certificates curl=7.68.0-1ubuntu2.18 ed flex g++ git gnupg-agent javacc libarchive-tools \
12- libatlas-base-dev libavcodec-dev libavformat-dev libboost-all-dev libbz2-dev \
13- libc-ares-dev libdc1394-22-dev libgflags-dev libgoogle-glog-dev libgtest-dev \
14- libgtk-3-dev libgtk2.0-dev libhdf5-serial-dev libjpeg-dev libjpeg8-dev libjsoncpp-dev \
15- libleveldb-dev liblmdb-dev liblz4-dev libopenblas-dev libopenmpi-dev \
16- libpng-dev librdkafka-dev libsnappy-dev libssl-dev libswscale-dev libtbb-dev \
17- libtbb2 libtiff-dev libtiff5-dev libtool mpich openjdk-11-jdk-headless \
18- pkg-config python3-dev python3-pip unzip
19- pip install --no-cache-dir " numpy>=1.23.2" " setuptools>=65.5.1"
20- ```
21- ### Clone/Download Dependencies
22- Here we clone the repositories for grpc v1.40.0, libpng12, Swig v4.0.2, OpenCV 4.5.3, Valijson v0.6, CMake v3.21.2, Faiss v1.7.1, and FLINNG. Then download necesarry files for zlib v1.2.13, Json-simple v1.1.1, and TileDB v1.3.1.
23- Here we assume ` $VDMS_DEP_DIR ` is the working directory for installing dependencies and ` python ` is Python 3.
11+ sudo apt-get install -y --no-install-suggests --no-install-recommends \
12+ apt-transport-https autoconf automake bison build-essential bzip2 ca-certificates \
13+ curl ed flex g++-9 gcc-9 git gnupg-agent javacc libarchive-tools libatlas-base-dev \
14+ 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 \
17+ 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 \
19+ openjdk-11-jdk-headless pkg-config procps python3-dev python3-pip software-properties-common \
20+ swig unzip uuid-dev
21+ ```
22+ Note: Your system may have g++ or gcc version 10+. If this is the case, please use version 9 to build VDMS. Optional method for setting version 9 as default:
23+ ``` bash
24+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 1
25+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 1
26+ ```
27+
28+ ### Install Remaining Dependencies
29+ Here we assume ` $VDMS_DEP_DIR ` is the directory for installing additional dependencies.
30+ This directory is user-defined but here we use ` /dependencies ` .
31+ These instructions assume you have full permissions to your system.
32+ If not running as root, add ` sudo ` where necessary.
2433``` bash
25- cd $VDMS_DEP_DIR
26- git clone --branch v3.21.2 https://github.com/Kitware/CMake.git && \
27- git clone --branch v4.0.2 https://github.com/swig/swig.git && \
28- git clone --branch v1.7.1 https://github.com/facebookresearch/faiss.git && \
29- git clone https://github.com/tonyzhang617/FLINNG.git && \
30- git clone --recurse-submodules -b v1.40.0 https://github.com/grpc/grpc.git && \
31- git clone --branch 4.5.3 https://github.com/opencv/opencv.git && \
32- git clone --branch v0.6 https://github.com/tristanpenman/valijson.git
34+ VDMS_DEP_DIR=/dependencies # Set to any directory
35+ BUILD_THREADS=" -j` nproc` "
36+ mkdir -p $VDMS_DEP_DIR
37+ ```
3338
34- sudo curl -L -o /usr/share/java/json-simple-1.1.1.jar https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/json-simple/json-simple-1.1.1.jar && \
35- sudo curl -L -o 1.3.1.tar.gz https://github.com/TileDB-Inc/TileDB/archive/refs/tags/1.3.1.tar.gz && \
36- sudo curl -L -o zlib-1.2.13.tar.gz http://zlib.net/zlib-1.2.13.tar.gz
39+ #### Python3 Packages
40+ Here we will install the necessary Python3 packages Numpy and Protobuf 3.20.3.
41+ You can also install the coverage package if interested in running the Python unit tests.
42+ ``` bash
43+ PROTOBUF_VERSION=" 3.20.3"
44+ pip3 install --no-cache-dir " numpy>=1.25.1" " protobuf==${PROTOBUF_VERSION} " " coverage>=7.2.7"
3745```
3846
39- ### Install Dependencies
40- These instructions assume you have full permissions to your system.
41- If running as root, remove ` sudo ` where necessary.
4247
43- #### CMAKE
48+ #### CMAKE v3.26.4
49+ VDMS requires CMake v3.21+. Here we install CMake v3.26.4.
4450``` bash
45- cd $VDMS_DEP_DIR /CMake && ./bootstrap
46- make -j && sudo make install
51+ CMAKE_VERSION=" v3.26.4"
52+ git clone --branch ${CMAKE_VERSION} https://github.com/Kitware/CMake.git $VDMS_DEP_DIR /CMake
53+ cd $VDMS_DEP_DIR /CMake
54+ ./bootstrap
55+ make ${BUILD_THREADS}
56+ make install
4757```
4858
49- ### Swig
59+ ### gtest
60+ Unfortunately apt doesn't build gtest so you need to do the following:
5061``` bash
51- cd $VDMS_DEP_DIR /swig
52- ./autogen.sh && ./configure
53- make -j && sudo make install
62+ cd /usr/src/gtest/
63+ cmake .
64+ make ${BUILD_THREADS}
65+ mv lib/libgtest* /usr/lib
5466```
5567
56- ### Faiss
68+ ### Faiss v1.7.3
5769``` bash
70+ FAISS_VERSION=" v1.7.3"
71+ git clone --branch ${FAISS_VERSION} https://github.com/facebookresearch/faiss.git $VDMS_DEP_DIR /faiss
5872cd $VDMS_DEP_DIR /faiss
5973mkdir build && cd build
6074cmake -DFAISS_ENABLE_GPU=OFF ..
61- make -j && sudo make install
75+ make ${BUILD_THREADS}
76+ make install
6277```
6378
6479### FLINNG
6580``` bash
81+ git clone https://github.com/tonyzhang617/FLINNG.git $VDMS_DEP_DIR /FLINNG
6682cd $VDMS_DEP_DIR /FLINNG
6783mkdir build && cd build
6884cmake ..
69- make -j && sudo make install
85+ make ${BUILD_THREADS}
86+ make install
7087```
7188
72- ### grpc
89+ ### Protobuf 3.20.3
7390``` bash
74- cd $VDMS_DEP_DIR /grpc
75- pip install --no-cache-dir -r requirements.txt
76- GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install --no-cache-dir .
77-
78- cd tools/distrib/python/grpcio_tools
79- python ../make_grpcio_tools.py
80- GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install --no-cache-dir .
81-
82- cd $VDMS_DEP_DIR /grpc/third_party/zlib/ && mkdir build && cd build
83- cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ..
84- make -j && sudo make install
85-
86- cd $VDMS_DEP_DIR /grpc/third_party/protobuf/cmake
87- mkdir build && cd build
88- cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -Dprotobuf_BUILD_TESTS=OFF ..
89- make -j && sudo make install
90-
91- cd ../../../abseil-cpp && mkdir build && cd build
92- cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ..
93- make -j && sudo make install
94-
95- cd ../../re2/ && mkdir build && cd build
96- cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ..
97- make -j && sudo make install
98-
99- cd $VDMS_DEP_DIR /grpc/cmake && mkdir build && cd build
100- cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DgRPC_ABSL_PROVIDER=package \
101- -DgRPC_CARES_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package \
102- -DgRPC_RE2_PROVIDER=package -DgRPC_SSL_PROVIDER=package \
103- -DgRPC_ZLIB_PROVIDER=package -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ../..
104- make -j && sudo make install
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
97+ make ${BUILD_THREADS}
98+ make install
99+ ldconfig
105100```
106101
107- ### [ OpenCV] ( https://opencv.org/ )
108-
109- Below are instructions for installing *** OpenCV v4.5.3*** . It may also work with newer versions of OpenCV.
102+ ### [ OpenCV] ( https://opencv.org/ ) 4.5.5
103+ Below are instructions for installing *** OpenCV v4.5.5*** .
110104``` bash
105+ OPENCV_VERSION=" 4.5.5"
106+ git clone --branch ${OPENCV_VERSION} https://github.com/opencv/opencv.git $VDMS_DEP_DIR /opencv
111107cd $VDMS_DEP_DIR /opencv
112108mkdir build && cd build
113- cmake -DBUILD_PERF_TESTS =OFF -DBUILD_TESTS =OFF ..
114- make -j
115- sudo make install
109+ cmake -D BUILD_PERF_TESTS =OFF -D BUILD_TESTS =OFF ..
110+ make ${BUILD_THREADS}
111+ make install
116112```
117113
118114** 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 ) ):
@@ -124,51 +120,51 @@ cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D
124120 -D WITH_FFMPEG=ON -D WITH_TBB=ON -D WITH_GTK=ON \
125121 -D WITH_V4L=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON \
126122 -DWITH_QT=OFF -DCUDA_NVCC_FLAGS=" -D_FORCE_INLINES" ..
127- make -j
123+ make ${BUILD_THREADS}
128124make install
129125```
130126
131- ### Zlib
127+ ### Valijson v0.6
128+ This is a headers-only library, no compilation/installation necessary
132129``` bash
133- cd $VDMS_DEP_DIR && tar -xvzf zlib-1.2.13.tar.gz
134- cd zlib-1.2.13 && ./configure
135- make -j && sudo make install
130+ VALIJSON_VERSION=" v0.6"
131+ git clone --branch ${VALIJSON_VERSION} https://github.com/tristanpenman/valijson.git $VDMS_DEP_DIR /valijson
132+ cd $VDMS_DEP_DIR /valijson
133+ cp -r include/* /usr/local/include/
136134```
137135
138- ### [ TileDB] ( https://tiledb.io/ )
139- VDMS works with *** TileDB v1.3.1.*** <br >
140- The directions below will help you install TileDB v1.3.1 from the source.
141- You can also follow the directions listed
142- [ here] ( https://docs.tiledb.io/en/latest/installation.html ) .
143- ``` bash
144- cd $VDMS_DEP_DIR && tar -xvf 1.3.1.tar.gz
145- cd TileDB-1.3.1 && mkdir build && cd build
146- ../bootstrap --prefix=/usr/local/
147- make -j && sudo make install-tiledb
148- ```
149136
150- ### gtest
151- Unfortunately apt doesn't build gtest;
152- you need to do the following steps to get it to work correctly:
137+ ### [ TileDB ] ( https://tiledb.io/ ) 2.14.1
138+ The directions below will help you install TileDB v2.14.1 from the source.
139+ You can also follow the directions listed [ here ] ( https://docs.tiledb.io/en/latest/installation.html ) .
153140``` bash
154- cd /usr/src/gtest/
155- sudo cmake .
156- sudo make -j
157- sudo mv lib/libgtest* /usr/lib
141+ TILEDB_VERSION=" 2.14.1"
142+ curl -L -o $VDMS_DEP_DIR /${TILEDB_VERSION} .tar.gz https://github.com/TileDB-Inc/TileDB/archive/refs/tags/${TILEDB_VERSION} .tar.gz && \
143+ cd $VDMS_DEP_DIR
144+ tar -xvf ${TILEDB_VERSION} .tar.gz
145+ cd TileDB-${TILEDB_VERSION}
146+ mkdir build && cd build
147+ ../bootstrap --prefix=/usr/local/
148+ make ${BUILD_THREADS}
149+ make install-tiledb
158150```
159151
160- ### Valijson
161- This is a headers-only library, no compilation/installation necessary
152+ ### AWS SDK CPP 1.11.0
162153``` bash
163- cd $VDMS_DEP_DIR /valijson
164- sudo cp -r include/* /usr/local/include
154+ AWS_SDK_VERSION=" 1.11.0"
155+ git clone -b ${AWS_SDK_VERSION} --recurse-submodules https://github.com/aws/aws-sdk-cpp ${VDMS_DEP_DIR} /aws-sdk-cpp
156+ mkdir -p ${VDMS_DEP_DIR} /aws-sdk-cpp/build
157+ cd ${VDMS_DEP_DIR} /aws-sdk-cpp/build
158+ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_ONLY=" s3" -DCUSTOM_MEMORY_MANAGEMENT=OFF
159+ make ${BUILD_THREADS}
160+ make install
165161```
166162
167163## Install VDMS
168164This 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.
169165``` bash
170- git clone https://github.com/IntelLabs/vdms.git
171- cd vdms && git checkout develop
166+ git clone -b develop https://github.com/IntelLabs/vdms.git
167+ cd vdms
172168git submodule update --init --recursive
173169```
174170
@@ -186,3 +182,4 @@ mkdir build && cd build
186182cmake -DCMAKE_CXX_FLAGS=' -DPM' ..
187183make -j
188184```
185+
0 commit comments