Skip to content

Commit 90721ba

Browse files
authored
Release v2.11.0 (#280)
1 parent 6d8168b commit 90721ba

File tree

227 files changed

+17765
-36069
lines changed

Some content is hidden

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

227 files changed

+17765
-36069
lines changed

.clang-format-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
./build/*
2+
./src/pmgd/*

.github/CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Contributing to VDMS
2+
Thank you for even being interested in contributing to VDMS.
3+
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether they involve new features, improved infrastructure, better documentation, or bug fixes.
4+
5+
To learn how to contribute to VDMS, please follow the [Developer Guide](https://github.com/IntelLabs/vdms/wiki/Developer-Guide).

.github/coverage/cpp.develop.coverage_report.txt

Lines changed: 27 additions & 26 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
63.8504
1+
68.9262
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name Stmts Miss Cover Missing
22
--------------------------------------------------------------------
33
/vdms/client/python/vdms/__init__.py 2 0 100%
4-
/vdms/client/python/vdms/vdms.py 99 2 98% 152, 167
4+
/vdms/client/python/vdms/vdms.py 95 2 98% 148, 163
55
--------------------------------------------------------------------
6-
TOTAL 101 2 98%
6+
TOTAL 97 2 98%
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
98.02
1+
97.94

.github/requirements.txt

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
blinker==1.8.2
1+
blinker==1.9.0
22
cffi==1.17.1
3-
click==8.1.7
4-
colorlog==6.8.2
5-
coverage==7.6.2
6-
cryptography==43.0.1
7-
Flask==3.0.3
8-
gcovr==8.0
3+
click==8.1.8
4+
colorlog==6.9.0
5+
coverage==7.8.0
6+
cryptography==44.0.2
7+
Flask==3.1.0
8+
gcovr==8.3
99
imutils==0.5.4
1010
itsdangerous==2.2.0
11-
Jinja2==3.1.4
12-
lxml==5.3.0
13-
MarkupSafe==3.0.1
11+
Jinja2==3.1.6
12+
lxml==5.3.2
13+
MarkupSafe==3.0.2
1414
numpy==1.26.4
15-
opencv-python-headless==4.9.0.80
15+
opencv-python-headless==4.11.0.86
16+
pillow==11.1.0
1617
protobuf==4.24.2
1718
pycparser==2.22
18-
Pygments==2.18.0
19-
pyzmq==26.0.3
20-
scipy==1.14.1
19+
Pygments==2.19.1
20+
pyzmq==26.4.0
21+
scipy==1.15.2
2122
sk-video==1.1.10
22-
Werkzeug==3.0.4
23+
Werkzeug==3.1.3
24+
zmq==0.0.0

.github/scripts/Dockerfile.checkin

Lines changed: 60 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ ARG NEO4J_PASS=""
1515
ARG NEO4J_ENDPOINT=""
1616
ARG AWS_API_PORT=9000
1717
ARG AWS_CONSOLE_PORT=9001
18+
ARG USE_K8S="OFF"
1819

1920
ENV DEBIAN_FRONTEND=noninteractive
2021
ENV DEBCONF_NOWARNINGS="yes"
@@ -32,6 +33,12 @@ ENV NEO4J_ENDPOINT="${NEO4J_ENDPOINT}"
3233
ENV AWS_API_PORT="${AWS_API_PORT}"
3334
ENV AWS_CONSOLE_PORT="${AWS_CONSOLE_PORT}"
3435

36+
# Convert ARG value to uppercase and set ENV
37+
# hadolint ignore=SC3059
38+
RUN export USE_K8S=$(echo "${USE_K8S^^}") && \
39+
echo "export USE_K8S=${USE_K8S}" >> /etc/profile.d/envvars.sh
40+
ENV USE_K8S="${USE_K8S}"
41+
3542
############################################################
3643
# BUILD DEPENDENCIES
3744
FROM base AS build
@@ -41,15 +48,15 @@ FROM base AS build
4148
RUN apt-get update -y && apt-get upgrade -y && \
4249
apt-get install -o 'Acquire::Retries=3' -y --no-install-suggests \
4350
--no-install-recommends --fix-broken --fix-missing \
44-
apt-transport-https automake bison build-essential bzip2 ca-certificates \
51+
apt-transport-https automake bazel-bootstrap bison build-essential bzip2 ca-certificates \
4552
cppzmq-dev curl ed flex g++ gcc git gnupg-agent javacc libarchive-tools libatlas-base-dev \
46-
libavcodec-dev libavformat-dev libavutil-dev libboost-all-dev libbz2-dev libc-ares-dev \
53+
libavcodec-dev libavformat-dev libavutil-dev libbison-dev libboost-all-dev libbz2-dev libc-ares-dev \
4754
libcurl4-openssl-dev libdc1394-dev libgflags-dev libgoogle-glog-dev \
4855
libgtk-3-dev libgtk2.0-dev libhdf5-dev libjpeg-dev libjpeg62-turbo-dev libjsoncpp-dev \
4956
libleveldb-dev liblmdb-dev liblz4-dev libncurses5-dev libopenblas-dev libopenmpi-dev \
5057
libpng-dev librdkafka-dev libsnappy-dev libssl-dev libswscale-dev libtbb-dev libtbbmalloc2 \
51-
libtiff-dev libtiff5-dev libtool linux-libc-dev mpich openjdk-17-jdk-headless \
52-
pkg-config procps software-properties-common swig unzip uuid-dev && \
58+
libtiff-dev libtiff5-dev libtool libwebsockets-dev linux-libc-dev mpich openjdk-17-jdk-headless \
59+
pkg-config procps software-properties-common swig uncrustify unzip uuid-dev && \
5360
apt-get --purge remove -y python3.11 && apt-get autoremove -y && \
5461
apt-get clean && rm -rf /var/lib/apt/lists/*
5562

@@ -69,7 +76,7 @@ WORKDIR /dependencies
6976
ENV AUTOCONF_VERSION="2.71" \
7077
AWS_SDK_VERSION="1.11.336" \
7178
CMAKE_VERSION="v3.28.5" \
72-
FAISS_VERSION="v1.7.4" \
79+
FAISS_VERSION="v1.9.0" \
7380
LIBEDIT_VERSION="20230828-3.1" \
7481
OPENCV_VERSION="4.9.0" \
7582
PEG_VERSION="0.1.19" \
@@ -163,6 +170,31 @@ RUN curl -L -O https://github.com/gpakosz/peg/releases/download/${PEG_VERSION}/p
163170
./configure --disable-werror --prefix=/opt/dist/usr && \
164171
make clean check && make install -w --debug
165172

173+
# FOR KUBERNETES ORCHESTRATION
174+
# hadolint ignore=DL3003,SC2086
175+
RUN if [ "${USE_K8S}" = "ON" ]; then \
176+
git clone --depth 1 https://github.com/yaml/libyaml.git /dependencies/libyaml && \
177+
cd /dependencies/libyaml && \
178+
mkdir build && \
179+
cd build && \
180+
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON .. && \
181+
make ${BUILD_THREADS} && \
182+
make install; \
183+
fi
184+
185+
# hadolint ignore=DL3003,SC2086
186+
RUN if [ "${USE_K8S}" = "ON" ]; then \
187+
git clone https://github.com/kubernetes-client/c.git /dependencies/k8s && \
188+
ls /dependencies/k8s && \
189+
CLIENT_REPO_ROOT=/dependencies/k8s && \
190+
cd ${CLIENT_REPO_ROOT}/kubernetes && \
191+
mkdir build && \
192+
cd build && \
193+
cmake -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
194+
make ${BUILD_THREADS} && \
195+
make install; \
196+
fi
197+
166198
# CLEANUP
167199
RUN rm -rf /dependencies /usr/local/share/doc /usr/local/share/man && \
168200
mkdir -p /opt/dist/usr/include/x86_64-linux-gnu && \
@@ -172,7 +204,12 @@ RUN rm -rf /dependencies /usr/local/share/doc /usr/local/share/man && \
172204
############################################################
173205
# FINAL IMAGE
174206
FROM base
175-
ARG BUILD_COVERAGE="on"
207+
ARG BUILD_COVERAGE="ON"
208+
209+
# Convert ARG value to uppercase and set ENV
210+
# hadolint ignore=SC3059
211+
RUN export BUILD_COVERAGE=$(echo "${BUILD_COVERAGE^^}") && \
212+
echo "export BUILD_COVERAGE=${BUILD_COVERAGE}" >> /etc/profile.d/envvars.sh
176213
ENV BUILD_COVERAGE="${BUILD_COVERAGE}"
177214

178215
# COPY FILES
@@ -183,38 +220,46 @@ COPY client /vdms/client
183220
COPY distributed /vdms/distributed
184221
COPY include /vdms/include
185222
COPY remote_function /vdms/remote_function
223+
COPY resources /vdms/resources
186224
COPY src /vdms/src
187225
COPY tests /vdms/tests
188226
COPY user_defined_operations /vdms/user_defined_operations
189227
COPY utils /vdms/utils
190228
COPY CMakeLists.txt /vdms/CMakeLists.txt
191229
COPY config-vdms.json /vdms/config-vdms.json
230+
COPY kubernetes/global_vdms_setup_script.sh /vdms/kubernetes/global_vdms_setup_script.sh
231+
COPY kubernetes/kubeConfig.json /vdms/kubernetes/kubeConfig.json
192232
COPY docker/override_default_config.py /vdms/override_default_config.py
193233
COPY --from=build /opt/dist /
194234
COPY --from=build /usr/local/bin/python${PYTHON_BASE} /usr/local/bin/python${PYTHON_BASE}
195235
COPY --from=build /usr/local/lib/python${PYTHON_BASE} /usr/local/lib/python${PYTHON_BASE}
196236
COPY --from=build ${VIRTUAL_ENV} ${VIRTUAL_ENV}
237+
COPY --from=build /usr/local/include/kubernete[s] /usr/local/include/kubernetes
238+
COPY --from=build /usr/include/libwebsocket[s] /usr/include/libwebsockets
239+
COPY --from=build /usr/local/lib/libkubernetes.s[o] /usr/local/lib/libkubernetes.so
240+
COPY --from=build /usr/local/lib/libyaml.s[o] /usr/local/lib/libyaml.so
241+
COPY --from=build /usr/lib/x86_64-linux-gnu/libwebsockets.s[o] /usr/lib/x86_64-linux-gnu/libwebsockets.so
197242
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
198243

199244
# hadolint ignore=DL3008,SC2086
200245
RUN apt-get update -y && apt-get upgrade -y && \
201246
apt-get install -o 'Acquire::Retries=3' -y --no-install-suggests \
202247
--no-install-recommends --fix-broken --fix-missing \
203-
build-essential bzip2 cppzmq-dev curl g++ gcc git javacc libarchive-tools libavcodec-dev \
248+
build-essential bzip2 cppzmq-dev curl g++ gcc git javacc libarchive-tools libavcodec-dev bazel-bootstrap \
204249
libavformat-dev libcurl4-openssl-dev libdc1394-dev libgoogle-glog-dev libgtk-3-dev \
205250
libhdf5-dev libjpeg62-turbo-dev libjsoncpp-dev libopenblas-dev libpng-dev librdkafka-dev \
206-
libssl-dev libswscale-dev libtbb-dev libtbbmalloc2 libtiff5-dev libzip-dev openjdk-17-jdk-headless \
207-
procps && \
251+
libssl-dev libswscale-dev libtbb-dev libtbbmalloc2 libtiff5-dev libwebsockets-dev libzip-dev \
252+
openjdk-17-jdk-headless procps uncrustify && \
208253
apt-get --purge remove -y python3.11 && apt-get autoremove -y && \
209254
apt-get clean && rm -rf /var/lib/apt/lists/* && \
210255
echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig && \
211256
python3 -m pip install --no-cache-dir "numpy>=${NUMPY_MIN_VERSION},<2.0.0" "protobuf==4.${PROTOBUF_VERSION}" \
212-
"coverage>=7.3.1" "cryptography>=42.0.7"
257+
"coverage>=7.3.1" "cryptography>=44.0.1"
213258

214259
# COVERAGE TESTING
215260
WORKDIR /vdms
216261
# hadolint ignore=DL3008,SC2086
217-
RUN if [ "${BUILD_COVERAGE}" = "on" ]; then \
262+
RUN if [ "${BUILD_COVERAGE}" = "ON" ]; then \
218263
apt-get update -y ; \
219264
apt-get install -y --no-install-suggests --no-install-recommends gdb ; \
220265
apt-get clean ; \
@@ -239,11 +284,12 @@ RUN git submodule update --init --recursive && \
239284
sed -i "s|#include <stdio.h>|#include <stdio.h>\n#include <stdexcept>|" /vdms/src/pmgd/test/neighbortest.cc && \
240285
sed -i "s|#include <stdio.h>|#include <stdio.h>\n#include <stdexcept>|" /vdms/src/pmgd/tools/mkgraph.cc && \
241286
mkdir -p /vdms/build && cd /vdms/build && \
242-
cmake -DCODE_COVERAGE="${BUILD_COVERAGE}" .. && make ${BUILD_THREADS} && \
287+
cmake -DUSE_K8S="${USE_K8S}" -DCODE_COVERAGE="${BUILD_COVERAGE}" .. && make ${BUILD_THREADS} VERBOSE=1 && \
243288
echo '#!/bin/bash' > /start.sh && echo 'cd /vdms/build' >> /start.sh && \
244-
echo 'python /vdms/override_default_config.py -i /vdms/config-vdms.json -o /vdms/build/config-vdms.json' >> /start.sh && \
289+
echo 'python3 /vdms/override_default_config.py -i /vdms/config-vdms.json -o /vdms/build/config-vdms.json' >> /start.sh && \
245290
echo './vdms' >> /start.sh && chmod 755 /start.sh
246291

247-
ENV PYTHONPATH=/vdms/client/python:${PYTHONPATH}
292+
ENV PYTHONPATH=/vdms/client/python
293+
248294
HEALTHCHECK CMD echo "This is a healthcheck test." || exit 1
249295
CMD ["/start.sh"]

.github/scripts/auto-formatter.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/scripts/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ services:
44
dockerfile: .github/scripts/Dockerfile.checkin
55
context: ../..
66
args:
7-
- BUILD_COVERAGE=on
7+
- BUILD_COVERAGE=ON
8+
- USE_K8S=ON
89
image: vdms:${SOURCE_CONTAINER_NAME}
910
container_name: ${SOURCE_CONTAINER_NAME}
1011
networks: [backend, frontend]

.github/scripts/run_coverage_cpp.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
cd /vdms/tests
44

5-
# Run Local C++ PMGD Based Tests
6-
chmod +x run_tests.sh
7-
echo 'Running run_tests.sh script'
8-
./run_tests.sh
9-
105
# Run S3 C++ PMGD Based Tests
116
echo 'Checking for the available disk space due MinIO requires at least 1gb free'
127
df -h
13-
chmod +x run_aws_tests.sh
14-
echo 'Running run_aws_tests.sh script'
15-
./run_aws_tests.sh -u ${AWS_ACCESS_KEY_ID} -p ${AWS_SECRET_ACCESS_KEY}
168

9+
chmod +x ./run_all_tests.py
10+
11+
echo 'Running run_all_tests.py script for remote C++ tests (-t=ru)'
12+
python ./run_all_tests.py -t=ru -k -u ${AWS_ACCESS_KEY_ID} -p ${AWS_SECRET_ACCESS_KEY}
13+
14+
echo 'Running run_all_tests script for C++ tests (-t=ut)'
15+
python ./run_all_tests.py -t=ut -k
16+
17+
echo 'Getting the coverage for C++'
1718
# Obtain Coverage
1819
gcovr --root /vdms \
1920
-e /vdms/src/pmgd -e /vdms/build -e /vdms/distributed -e /vdms/tests \

.github/scripts/run_coverage_py.sh

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
#!/bin/bash -e
22

3-
cd /vdms/tests/python
3+
cd /vdms/tests
4+
chmod +x ./run_all_tests.py
5+
chmod +x ./TestScript.py
46

5-
./run_python_tests.sh
6-
./run_python_aws_tests.sh -u ${AWS_ACCESS_KEY_ID} -p ${AWS_SECRET_ACCESS_KEY}
7-
python -m coverage report -m 2>&1 | tee /vdms/tests/coverage_report/python.new.coverage_report.txt
8-
python -m coverage xml -o /vdms/tests/coverage_report/python.new.coverage_report.xml
7+
# Check .coverage file doesn't exist
8+
if [ -f './.coverage' ]; then
9+
echo ".coverage exists."
10+
rm ./.coverage
11+
echo ".coverage deleted."
12+
fi
13+
14+
echo 'Running run_all_tests script for Python tests (-t=pt)'
15+
python3 ./run_all_tests.py -t=pt -k
16+
17+
echo 'Running run_all_tests script for Remote Python tests (-t=rp)'
18+
python3 ./run_all_tests.py -t=rp -k -u=${AWS_ACCESS_KEY_ID} -p=${AWS_SECRET_ACCESS_KEY}
19+
20+
echo 'Running the tests included in TestScript.py file'
21+
# Append the coverage results to the ones obtained from running run_all_tests.py
22+
python3 -m coverage run -a --omit="./run_all_tests.py,./TestScript.py" -m unittest discover --pattern=TestScript.py -v
23+
24+
python3 -m coverage report -m 2>&1 | tee /vdms/tests/coverage_report/python.new.coverage_report.txt
25+
python3 -m coverage xml -o /vdms/tests/coverage_report/python.new.coverage_report.xml
926

1027
echo "DONE"
1128

0 commit comments

Comments
 (0)