Skip to content

Commit 0943081

Browse files
cwlaceweRagaad
andauthored
Release v2.4.0 (#156)
* Add generic AddBlob command * Correct zlib and tiledb paths * Add CSV CPP Client Plugin * Add files to update pypi package Co-authored-by: Ragaad <[email protected]>
1 parent b6836ea commit 0943081

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+4800
-503
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
build/
22
db/
33
*.gcov
4+
**/__pycache__/
45

56
# VS Code Specific
67
.devcontainer

CMakeLists.txt

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,30 @@ else()
4040

4141
link_directories(/usr/local/lib /usr/lib/x86_64-linux-gnu/)
4242
include_directories(/usr/include/jsoncpp utils/include/ src/pmgd/include src/pmgd/util include/ src/vcl /usr/include ${CMAKE_CURRENT_BINARY_DIR}/utils/src/protobuf)
43-
add_library(dms SHARED src/BoundingBoxCommand.cc src/CommunicationManager.cc src/DescriptorsCommand.cc src/DescriptorsManager.cc src/ExceptionsCommand.cc src/ImageCommand.cc src/PMGDIterators.cc src/PMGDQuery.cc src/PMGDQueryHandler.cc src/QueryHandler.cc src/QueryMessage.cc src/RSCommand.cc src/SearchExpression.cc src/Server.cc src/VDMSConfig.cc src/VideoCommand.cc src/AutoDeleteNode.cc ${PROTO_SRCS} ${PROTO_HDRS})
43+
add_library(dms SHARED
44+
src/BoundingBoxCommand.cc
45+
src/BlobCommand.cc
46+
src/CommunicationManager.cc
47+
src/DescriptorsCommand.cc
48+
src/DescriptorsManager.cc
49+
src/ExceptionsCommand.cc
50+
src/ImageCommand.cc
51+
src/PMGDIterators.cc
52+
src/PMGDQuery.cc
53+
src/PMGDQueryHandler.cc
54+
src/QueryHandler.cc
55+
src/QueryMessage.cc
56+
src/RSCommand.cc
57+
src/SearchExpression.cc
58+
src/Server.cc
59+
src/VDMSConfig.cc
60+
src/VideoCommand.cc
61+
src/AutoDeleteNode.cc
62+
${PROTO_SRCS} ${PROTO_HDRS}
63+
)
4464
target_link_libraries(dms vcl pmgd pmgd-util protobuf vdms-utils pthread)
4565

4666

4767
add_executable(vdms src/vdms.cc)
4868
target_link_libraries(vdms dms vdms_protobuf vcl tiledb faiss flinng jsoncpp ${OpenCV_LIBS})
49-
endif ()
69+
endif ()

INSTALL.md

Lines changed: 75 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -2,126 +2,117 @@
22
Here is the detailed process of installation of VDMS dependencies.
33

44
## Dependencies
5-
Here we will install the Ubuntu 20.04 packages.
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.
66
```bash
7-
apt-get update
8-
apt-get -y install software-properties-common
9-
add-apt-repository "deb http://security.ubuntu.com/ubuntu focal-security main"
10-
apt-get -y install apt-transport-https autoconf automake bison build-essential \
11-
bzip2 ca-certificates curl ed flex g++ git gnupg-agent javacc libarchive-tools \
7+
sudo 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 \
1212
libatlas-base-dev libavcodec-dev libavformat-dev libboost-all-dev libbz2-dev \
1313
libc-ares-dev libdc1394-22-dev libgflags-dev libgoogle-glog-dev libgtest-dev \
1414
libgtk-3-dev libgtk2.0-dev libhdf5-serial-dev libjpeg-dev libjpeg8-dev libjsoncpp-dev \
1515
libleveldb-dev liblmdb-dev liblz4-dev libopenblas-dev libopenmpi-dev \
1616
libpng-dev librdkafka-dev libsnappy-dev libssl-dev libswscale-dev libtbb-dev \
17-
libtbb2 libtiff-dev libtiff5-dev libtool maven mpich openjdk-11-jdk-headless \
18-
pkg-config python python-dev python3-pip unzip wget
19-
pip3 install numpy
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"
2020
```
2121
### 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.12, Json-simple v1.1.1, and TileDB v1.3.1.
23-
Here we assume `/` is the working directory. This is important when installing the 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.
2424
```bash
25-
git clone --branch v1.40.0 https://github.com/grpc/grpc.git && \
26-
git clone --branch v4.0.2 https://github.com/swig/swig.git && \
27-
git clone --branch 4.5.3 https://github.com/opencv/opencv.git && \
28-
git clone --branch v0.6 https://github.com/tristanpenman/valijson.git && \
25+
cd $VDMS_DEP_DIR
2926
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 && \
3028
git clone --branch v1.7.1 https://github.com/facebookresearch/faiss.git && \
31-
git clone https://github.com/tonyzhang617/FLINNG.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
3233

33-
curl http://zlib.net/zlib-1.2.12.tar.gz -o zlib-1.2.12.tar.gz && \
34-
curl https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/json-simple/json-simple-1.1.1.jar \
35-
-o /usr/share/java/json-simple-1.1.1.jar && \
36-
wget https://github.com/TileDB-Inc/TileDB/archive/1.3.1.tar.gz
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
3737
```
3838

3939
### Install Dependencies
4040
These instructions assume you have full permissions to your system.
41-
If needed, use `sudo` where necessary.
41+
If running as root, remove `sudo` where necessary.
42+
4243
#### CMAKE
4344
```bash
44-
cd /CMake && ./bootstrap
45-
make -j && make install
45+
cd $VDMS_DEP_DIR/CMake && ./bootstrap
46+
make -j && sudo make install
4647
```
4748

4849
### Swig
4950
```bash
50-
cd /swig
51+
cd $VDMS_DEP_DIR/swig
5152
./autogen.sh && ./configure
52-
make -j && make install
53+
make -j && sudo make install
5354
```
5455

5556
### Faiss
5657
```bash
57-
cd /faiss
58+
cd $VDMS_DEP_DIR/faiss
5859
mkdir build && cd build
5960
cmake -DFAISS_ENABLE_GPU=OFF ..
60-
make -j && make install
61+
make -j && sudo make install
6162
```
6263

6364
### FLINNG
6465
```bash
65-
cd /FLINNG
66+
cd $VDMS_DEP_DIR/FLINNG
6667
mkdir build && cd build
6768
cmake ..
68-
make -j && make install
69+
make -j && sudo make install
6970
```
7071

7172
### grpc
7273
```bash
73-
cd /grpc && git submodule update --init --recursive
74-
cd third_party/protobuf/cmake && mkdir build && cd build
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
7583
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ..
76-
make -j && make install
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
7790

7891
cd ../../../abseil-cpp && mkdir build && cd build
7992
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ..
80-
make -j && make install
93+
make -j && sudo make install
8194

8295
cd ../../re2/ && mkdir build && cd build
8396
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ..
84-
make -j && make install
97+
make -j && sudo make install
8598

86-
cd ../../zlib/ && mkdir build && cd build
87-
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ..
88-
make -j && make install
89-
90-
cd /grpc/cmake && mkdir build && cd build
99+
cd $VDMS_DEP_DIR/grpc/cmake && mkdir build && cd build
91100
cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DgRPC_ABSL_PROVIDER=package \
92101
-DgRPC_CARES_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package \
93102
-DgRPC_RE2_PROVIDER=package -DgRPC_SSL_PROVIDER=package \
94103
-DgRPC_ZLIB_PROVIDER=package -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ../..
95-
make -j && make install
96-
```
97-
98-
### Zlib
99-
```bash
100-
cd / && gunzip zlib-1.2.12.tar.gz && tar -xvf zlib-1.2.12.tar
101-
cd zlib-1.2.12 && ./configure
102-
make -j && make install
103-
cd / && rm -rf zlib-1.2.12.tar zlib-1.2.12
104-
```
105-
106-
### gtest
107-
Unfortunately apt doesn't build gtest;
108-
you need to do the following steps to get it to work correctly:
109-
```bash
110-
cd /usr/src/gtest/
111-
cmake .
112-
make -j
113-
mv lib/libgtest* /usr/lib
104+
make -j && sudo make install
114105
```
115106

116107
### [OpenCV](https://opencv.org/)
117108

118109
Below are instructions for installing ***OpenCV v4.5.3***. It may also work with newer versions of OpenCV.
119110
```bash
120-
cd /opencv
111+
cd $VDMS_DEP_DIR/opencv
121112
mkdir build && cd build
122-
cmake -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local ..
113+
cmake -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF ..
123114
make -j
124-
make install
115+
sudo make install
125116
```
126117

127118
**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)):
@@ -137,76 +128,61 @@ make -j
137128
make install
138129
```
139130

131+
### Zlib
132+
```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
136+
```
137+
140138
### [TileDB](https://tiledb.io/)
141139
VDMS works with ***TileDB v1.3.1.***<br>
142140
The directions below will help you install TileDB v1.3.1 from the source.
143141
You can also follow the directions listed
144142
[here](https://docs.tiledb.io/en/latest/installation.html).
145143
```bash
146-
cd / && tar xf 1.3.1.tar.gz && rm 1.3.1.tar.gz
144+
cd $VDMS_DEP_DIR && tar -xvf 1.3.1.tar.gz
147145
cd TileDB-1.3.1 && mkdir build && cd build
148146
../bootstrap --prefix=/usr/local/
149-
make -j && make install-tiledb
150-
rm -rf /TileDB-1.3.1
147+
make -j && sudo make install-tiledb
151148
```
152149

153-
### Maven
150+
### gtest
151+
Unfortunately apt doesn't build gtest;
152+
you need to do the following steps to get it to work correctly:
154153
```bash
155-
ln -s /grpc/third_party/protobuf/cmake/build/protoc grpc/third_party/protobuf/src/protoc
156-
cd /grpc/third_party/protobuf/java/core
157-
mvn package
158-
cp target/protobuf-java-3.13.0.jar /usr/share/java/protobuf.jar
159-
```
160-
161-
You may need to change proxy setting for Maven if you are behind a proxy like this example.
162-
Add setting.xml file to ~/.m2 folder
163-
```
164-
<proxies>
165-
<proxy>
166-
<id>optional</id>
167-
<!-- <active>true</active> -->
168-
<protocol>https</protocol>
169-
<!--<username>proxyuser</username>
170-
<password>proxypass</password>-->
171-
<host>prox-address</host>
172-
<port>proxy-port</port>
173-
<nonProxyHosts></nonProxyHosts>
174-
</proxy>
175-
</proxies>
154+
cd /usr/src/gtest/
155+
sudo cmake .
156+
sudo make -j
157+
sudo mv lib/libgtest* /usr/lib
176158
```
177159

178160
### Valijson
179161
This is a headers-only library, no compilation/installation necessary
180162
```bash
181-
cd /valijson
182-
cp -r include/* /usr/local/include
163+
cd $VDMS_DEP_DIR/valijson
164+
sudo cp -r include/* /usr/local/include
183165
```
184166

185167
## Install VDMS
168+
This 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.
186169
```bash
187170
git clone https://github.com/IntelLabs/vdms.git
188171
cd vdms && git checkout develop
189172
git submodule update --init --recursive
173+
```
174+
175+
When compiling on a target without Optane persistent memory, use the following:
176+
```bash
190177
mkdir build && cd build
191178
cmake ..
192179
make -j
193180
cp ../config-vdms.json .
194181
```
195182

196-
197-
### Compilation
198-
This 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.
199-
200183
When compiling on a target with Optane persistent memory, use the command set:
201184
```bash
202185
mkdir build && cd build
203186
cmake -DCMAKE_CXX_FLAGS='-DPM' ..
204187
make -j
205188
```
206-
207-
For systems without Optane, use the command set:
208-
```bash
209-
mkdir build && cd build
210-
cmake ..
211-
make -j<number of threads to use for compiling>
212-
```

Security.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# Security Policy
2-
Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.
3-
4-
## Reporting a Vulnerability
5-
Please report any security vulnerabilities in this project [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html).
6-
1+
# Security Policy
2+
Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.
3+
4+
## Reporting a Vulnerability
5+
Please report any security vulnerabilities in this project [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html).

0 commit comments

Comments
 (0)