Skip to content

Commit b038fe0

Browse files
authored
VDMS 2.7.0 Release (#168)
1 parent 0a70563 commit b038fe0

Some content is hidden

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

52 files changed

+1476
-972
lines changed

INSTALL.md

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ To install VDMS, we must install the necessary dependencies via apt, github, and
77
### Install Debian/Ubuntu Packages
88
Here we will install the Debian/Ubuntu packages.
99
```bash
10-
sudo apt-get update
10+
sudo apt-get update -y --fix-missing
11+
sudo apt-get upgrade -y
1112
sudo apt-get install -y --no-install-suggests --no-install-recommends \
1213
apt-transport-https autoconf automake bison build-essential bzip2 ca-certificates \
1314
curl ed flex g++-9 gcc-9 git gnupg-agent javacc libarchive-tools libatlas-base-dev \
@@ -55,7 +56,17 @@ alias python=/usr/bin/python3
5556
You can also install the coverage package if interested in running the Python unit tests.
5657
```bash
5758
python3 -m pip install --upgrade pip
58-
python3 -m pip install --no-cache-dir "numpy>=1.25.1" "coverage>=7.2.7"
59+
python3 -m pip install --no-cache-dir "numpy>=1.26.0" "coverage>=7.3.1"
60+
```
61+
62+
63+
#### **Valijson v0.6**
64+
This is a headers-only library, no compilation/installation necessary.
65+
```bash
66+
VALIJSON_VERSION="v0.6"
67+
git clone --branch ${VALIJSON_VERSION} https://github.com/tristanpenman/valijson.git $VDMS_DEP_DIR/valijson
68+
cd $VDMS_DEP_DIR/valijson
69+
sudo cp -r include/* /usr/local/include/
5970
```
6071

6172

@@ -71,36 +82,11 @@ sudo make install
7182
```
7283

7384

74-
#### **Faiss v1.7.3**
75-
Install the Faiss library for similarity search.
76-
```bash
77-
FAISS_VERSION="v1.7.3"
78-
git clone --branch ${FAISS_VERSION} https://github.com/facebookresearch/faiss.git $VDMS_DEP_DIR/faiss
79-
cd $VDMS_DEP_DIR/faiss
80-
mkdir build && cd build
81-
cmake -DFAISS_ENABLE_GPU=OFF -DPython_EXECUTABLE=/usr/bin/python3 ..
82-
make ${BUILD_THREADS}
83-
sudo make install
84-
```
85-
86-
87-
#### **FLINNG**
88-
Install the Filters to Identify Near-Neighbor Groups (FLINNG) library for similarity search.
89-
```bash
90-
git clone https://github.com/tonyzhang617/FLINNG.git $VDMS_DEP_DIR/FLINNG
91-
cd $VDMS_DEP_DIR/FLINNG
92-
mkdir build && cd build
93-
cmake ..
94-
make ${BUILD_THREADS}
95-
sudo make install
96-
```
97-
98-
9985
#### **Protobuf v24.2 (4.24.2)**
10086
Install Protobuf (C++ and Python) which requires GoogleTest and Abseil C++ as dependencies.
10187
```bash
10288
PROTOBUF_VERSION="24.2"
103-
git clone -b v${PROTOBUF_VERSION} --recursive https://github.com/protocolbuffers/protobuf.git $VDMS_DEP_DIR/protobuf
89+
git clone -b v${PROTOBUF_VERSION} --recurse-submodules https://github.com/protocolbuffers/protobuf.git $VDMS_DEP_DIR/protobuf
10490

10591
cd $VDMS_DEP_DIR/protobuf/third_party/googletest
10692
mkdir build && cd build
@@ -128,42 +114,31 @@ python3 -m pip install --no-cache-dir "protobuf==4.${PROTOBUF_VERSION}"
128114
```
129115

130116

131-
#### **[OpenCV](https://opencv.org/) 4.5.5**
132-
Below are instructions for installing ***OpenCV v4.5.5***.
117+
#### **Faiss v1.7.3**
118+
Install the Faiss library for similarity search.
133119
```bash
134-
OPENCV_VERSION="4.5.5"
135-
git clone --branch ${OPENCV_VERSION} https://github.com/opencv/opencv.git $VDMS_DEP_DIR/opencv
136-
cd $VDMS_DEP_DIR/opencv
120+
FAISS_VERSION="v1.7.3"
121+
git clone --branch ${FAISS_VERSION} https://github.com/facebookresearch/faiss.git $VDMS_DEP_DIR/faiss
122+
cd $VDMS_DEP_DIR/faiss
137123
mkdir build && cd build
138-
cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF ..
124+
cmake -DFAISS_ENABLE_GPU=OFF -DPython_EXECUTABLE=/usr/bin/python3 ..
139125
make ${BUILD_THREADS}
140126
sudo make install
141127
```
142128

143-
**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)):
144-
```bash
145-
apt-get install ffmpeg
146-
apt-get install libavcodec-dev libavformat-dev libavdevice-dev
147129

148-
cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
149-
-D WITH_FFMPEG=ON -D WITH_TBB=ON -D WITH_GTK=ON \
150-
-D WITH_V4L=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON \
151-
-DWITH_QT=OFF -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..
130+
#### **FLINNG**
131+
Install the Filters to Identify Near-Neighbor Groups (FLINNG) library for similarity search.
132+
```bash
133+
git clone https://github.com/tonyzhang617/FLINNG.git $VDMS_DEP_DIR/FLINNG
134+
cd $VDMS_DEP_DIR/FLINNG
135+
mkdir build && cd build
136+
cmake ..
152137
make ${BUILD_THREADS}
153138
sudo make install
154139
```
155140

156141

157-
#### **Valijson v0.6**
158-
This is a headers-only library, no compilation/installation necessary.
159-
```bash
160-
VALIJSON_VERSION="v0.6"
161-
git clone --branch ${VALIJSON_VERSION} https://github.com/tristanpenman/valijson.git $VDMS_DEP_DIR/valijson
162-
cd $VDMS_DEP_DIR/valijson
163-
sudo cp -r include/* /usr/local/include/
164-
```
165-
166-
167142
#### **[TileDB](https://tiledb.io/) 2.14.1**
168143
The directions below will help you install TileDB v2.14.1 from the source.
169144
You can also follow the directions listed [here](https://docs.tiledb.io/en/latest/installation.html).
@@ -191,28 +166,53 @@ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTAL
191166
make ${BUILD_THREADS}
192167
sudo make install
193168
```
169+
170+
171+
#### **[OpenCV](https://opencv.org/) 4.5.5**
172+
Below are instructions for installing ***OpenCV v4.5.5***.
173+
```bash
174+
OPENCV_VERSION="4.5.5"
175+
git clone --branch ${OPENCV_VERSION} https://github.com/opencv/opencv.git $VDMS_DEP_DIR/opencv
176+
cd $VDMS_DEP_DIR/opencv
177+
mkdir build && cd build
178+
cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF ..
179+
make ${BUILD_THREADS}
180+
sudo make install
181+
```
182+
183+
**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)):
184+
```bash
185+
sudo apt-get install -y ffmpeg
186+
sudo apt-get install -y libavdevice-dev
187+
188+
cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
189+
-D WITH_FFMPEG=ON -D WITH_TBB=ON -D WITH_GTK=ON \
190+
-D WITH_V4L=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON \
191+
-DWITH_QT=OFF -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..
192+
make ${BUILD_THREADS}
193+
sudo make install
194+
```
194195
<br>
195196

196197
## Install VDMS
197198
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.
198199
```bash
199-
git clone -b develop https://github.com/IntelLabs/vdms.git
200+
git clone -b develop --recurse-submodules https://github.com/IntelLabs/vdms.git
200201
cd vdms
201-
git submodule update --init --recursive
202202
```
203203

204204
When compiling on a target without Optane persistent memory, use the following:
205205
```bash
206206
mkdir build && cd build
207207
cmake ..
208-
make -j
208+
make ${BUILD_THREADS}
209209
cp ../config-vdms.json .
210210
```
211211

212212
When compiling on a target with Optane persistent memory, use the command set:
213213
```bash
214214
mkdir build && cd build
215215
cmake -DCMAKE_CXX_FLAGS='-DPM' ..
216-
make -j
216+
make ${BUILD_THREADS}
217217
```
218218

client/python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="vdms",
8-
version="0.0.19",
8+
version="0.0.20",
99
author="Chaunté W. Lacewell",
1010
author_email="[email protected]",
1111
description="VDMS Client Module",

client/python/vdms/vdms.py

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@
4242
class vdms(object):
4343
def __init__(self):
4444
self.dataNotUsed = []
45+
self.init_connection()
46+
self.last_response = ""
47+
48+
def __del__(self):
49+
self.conn.close()
50+
self.connected = False
51+
52+
def init_connection(self):
53+
if hasattr(self, "conn") and self.conn is not None:
54+
self.conn.close()
55+
4556
self.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
4657
self.conn.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1)
4758

@@ -51,20 +62,29 @@ def __init__(self):
5162
# https://docs.python.org/dev/library/sys.html#sys.platform
5263
if sys.platform.startswith("linux"):
5364
self.conn.setsockopt(socket.SOL_TCP, socket.TCP_QUICKACK, 1)
54-
5565
self.connected = False
56-
self.last_response = ""
57-
58-
def __del__(self):
59-
self.conn.close()
6066

6167
def connect(self, host="localhost", port=55555):
62-
self.conn.connect((host, port))
63-
self.connected = True
68+
if self.connected is False:
69+
self.init_connection()
70+
self.conn.connect((host, port))
71+
self.connected = True
72+
return True
73+
else:
74+
print("Connection is already active")
75+
return False
6476

6577
def disconnect(self):
66-
self.conn.close()
67-
self.connected = False
78+
if self.connected is True:
79+
self.conn.close()
80+
self.connected = False
81+
return True
82+
else:
83+
print("There is not an active connection")
84+
return False
85+
86+
def is_connected(self):
87+
return self.connected
6888

6989
# Recieves a json struct as a string
7090
def query(self, query, blob_array=[]):

config-vdms.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
// "backup_path":"backups_test", // set this if you want different path to store the back up file
77
"db_root_path": "db",
88
"backup_flag" : "false",
9-
"storage_type": "local", //local, aws, etc
9+
"storage_type": "local", //local, aws
10+
// use_endpoint: [true|false] in case of "storage_type" is equals to "aws", this key is used to specify whether it is going to use a "mocked" AWS connection
11+
"use_endpoint": false,
1012
"bucket_name": "minio-bucket",
1113
"more-info": "github.com/IntelLabs/vdms"
1214
}

0 commit comments

Comments
 (0)