diff --git a/INSTALL.md b/INSTALL.md
index f80c7b0d..e383cb55 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -7,7 +7,8 @@ To install VDMS, we must install the necessary dependencies via apt, github, and
### Install Debian/Ubuntu Packages
Here we will install the Debian/Ubuntu packages.
```bash
-sudo apt-get update
+sudo apt-get update -y --fix-missing
+sudo apt-get upgrade -y
sudo apt-get install -y --no-install-suggests --no-install-recommends \
apt-transport-https autoconf automake bison build-essential bzip2 ca-certificates \
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
You can also install the coverage package if interested in running the Python unit tests.
```bash
python3 -m pip install --upgrade pip
-python3 -m pip install --no-cache-dir "numpy>=1.25.1" "coverage>=7.2.7"
+python3 -m pip install --no-cache-dir "numpy>=1.26.0" "coverage>=7.3.1"
+```
+
+
+#### **Valijson v0.6**
+This is a headers-only library, no compilation/installation necessary.
+```bash
+VALIJSON_VERSION="v0.6"
+git clone --branch ${VALIJSON_VERSION} https://github.com/tristanpenman/valijson.git $VDMS_DEP_DIR/valijson
+cd $VDMS_DEP_DIR/valijson
+sudo cp -r include/* /usr/local/include/
```
@@ -71,36 +82,11 @@ sudo make install
```
-#### **Faiss v1.7.3**
-Install the Faiss library for similarity search.
-```bash
-FAISS_VERSION="v1.7.3"
-git clone --branch ${FAISS_VERSION} https://github.com/facebookresearch/faiss.git $VDMS_DEP_DIR/faiss
-cd $VDMS_DEP_DIR/faiss
-mkdir build && cd build
-cmake -DFAISS_ENABLE_GPU=OFF -DPython_EXECUTABLE=/usr/bin/python3 ..
-make ${BUILD_THREADS}
-sudo make install
-```
-
-
-#### **FLINNG**
-Install the Filters to Identify Near-Neighbor Groups (FLINNG) library for similarity search.
-```bash
-git clone https://github.com/tonyzhang617/FLINNG.git $VDMS_DEP_DIR/FLINNG
-cd $VDMS_DEP_DIR/FLINNG
-mkdir build && cd build
-cmake ..
-make ${BUILD_THREADS}
-sudo make install
-```
-
-
#### **Protobuf v24.2 (4.24.2)**
Install Protobuf (C++ and Python) which requires GoogleTest and Abseil C++ as dependencies.
```bash
PROTOBUF_VERSION="24.2"
-git clone -b v${PROTOBUF_VERSION} --recursive https://github.com/protocolbuffers/protobuf.git $VDMS_DEP_DIR/protobuf
+git clone -b v${PROTOBUF_VERSION} --recurse-submodules https://github.com/protocolbuffers/protobuf.git $VDMS_DEP_DIR/protobuf
cd $VDMS_DEP_DIR/protobuf/third_party/googletest
mkdir build && cd build
@@ -128,42 +114,31 @@ python3 -m pip install --no-cache-dir "protobuf==4.${PROTOBUF_VERSION}"
```
-#### **[OpenCV](https://opencv.org/) 4.5.5**
-Below are instructions for installing ***OpenCV v4.5.5***.
+#### **Faiss v1.7.3**
+Install the Faiss library for similarity search.
```bash
-OPENCV_VERSION="4.5.5"
-git clone --branch ${OPENCV_VERSION} https://github.com/opencv/opencv.git $VDMS_DEP_DIR/opencv
-cd $VDMS_DEP_DIR/opencv
+FAISS_VERSION="v1.7.3"
+git clone --branch ${FAISS_VERSION} https://github.com/facebookresearch/faiss.git $VDMS_DEP_DIR/faiss
+cd $VDMS_DEP_DIR/faiss
mkdir build && cd build
-cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF ..
+cmake -DFAISS_ENABLE_GPU=OFF -DPython_EXECUTABLE=/usr/bin/python3 ..
make ${BUILD_THREADS}
sudo make install
```
-**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)):
-```bash
-apt-get install ffmpeg
-apt-get install libavcodec-dev libavformat-dev libavdevice-dev
-cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
- -D WITH_FFMPEG=ON -D WITH_TBB=ON -D WITH_GTK=ON \
- -D WITH_V4L=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON \
- -DWITH_QT=OFF -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..
+#### **FLINNG**
+Install the Filters to Identify Near-Neighbor Groups (FLINNG) library for similarity search.
+```bash
+git clone https://github.com/tonyzhang617/FLINNG.git $VDMS_DEP_DIR/FLINNG
+cd $VDMS_DEP_DIR/FLINNG
+mkdir build && cd build
+cmake ..
make ${BUILD_THREADS}
sudo make install
```
-#### **Valijson v0.6**
-This is a headers-only library, no compilation/installation necessary.
-```bash
-VALIJSON_VERSION="v0.6"
-git clone --branch ${VALIJSON_VERSION} https://github.com/tristanpenman/valijson.git $VDMS_DEP_DIR/valijson
-cd $VDMS_DEP_DIR/valijson
-sudo cp -r include/* /usr/local/include/
-```
-
-
#### **[TileDB](https://tiledb.io/) 2.14.1**
The directions below will help you install TileDB v2.14.1 from the source.
You can also follow the directions listed [here](https://docs.tiledb.io/en/latest/installation.html).
@@ -191,21 +166,46 @@ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTAL
make ${BUILD_THREADS}
sudo make install
```
+
+
+#### **[OpenCV](https://opencv.org/) 4.5.5**
+Below are instructions for installing ***OpenCV v4.5.5***.
+```bash
+OPENCV_VERSION="4.5.5"
+git clone --branch ${OPENCV_VERSION} https://github.com/opencv/opencv.git $VDMS_DEP_DIR/opencv
+cd $VDMS_DEP_DIR/opencv
+mkdir build && cd build
+cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF ..
+make ${BUILD_THREADS}
+sudo make install
+```
+
+**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)):
+```bash
+sudo apt-get install -y ffmpeg
+sudo apt-get install -y libavdevice-dev
+
+cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \
+ -D WITH_FFMPEG=ON -D WITH_TBB=ON -D WITH_GTK=ON \
+ -D WITH_V4L=ON -D WITH_OPENGL=ON -D WITH_CUBLAS=ON \
+ -DWITH_QT=OFF -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..
+make ${BUILD_THREADS}
+sudo make install
+```
## Install VDMS
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.
```bash
-git clone -b develop https://github.com/IntelLabs/vdms.git
+git clone -b develop --recurse-submodules https://github.com/IntelLabs/vdms.git
cd vdms
-git submodule update --init --recursive
```
When compiling on a target without Optane persistent memory, use the following:
```bash
mkdir build && cd build
cmake ..
-make -j
+make ${BUILD_THREADS}
cp ../config-vdms.json .
```
@@ -213,6 +213,6 @@ When compiling on a target with Optane persistent memory, use the command set:
```bash
mkdir build && cd build
cmake -DCMAKE_CXX_FLAGS='-DPM' ..
-make -j
+make ${BUILD_THREADS}
```
diff --git a/client/python/setup.py b/client/python/setup.py
index ef627cd4..a6c72e0f 100644
--- a/client/python/setup.py
+++ b/client/python/setup.py
@@ -5,7 +5,7 @@
setuptools.setup(
name="vdms",
- version="0.0.19",
+ version="0.0.20",
author="Chaunté W. Lacewell",
author_email="chaunte.w.lacewell@intel.com",
description="VDMS Client Module",
diff --git a/client/python/vdms/vdms.py b/client/python/vdms/vdms.py
index 248d6731..9044858d 100644
--- a/client/python/vdms/vdms.py
+++ b/client/python/vdms/vdms.py
@@ -42,6 +42,17 @@
class vdms(object):
def __init__(self):
self.dataNotUsed = []
+ self.init_connection()
+ self.last_response = ""
+
+ def __del__(self):
+ self.conn.close()
+ self.connected = False
+
+ def init_connection(self):
+ if hasattr(self, "conn") and self.conn is not None:
+ self.conn.close()
+
self.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.conn.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1)
@@ -51,20 +62,29 @@ def __init__(self):
# https://docs.python.org/dev/library/sys.html#sys.platform
if sys.platform.startswith("linux"):
self.conn.setsockopt(socket.SOL_TCP, socket.TCP_QUICKACK, 1)
-
self.connected = False
- self.last_response = ""
-
- def __del__(self):
- self.conn.close()
def connect(self, host="localhost", port=55555):
- self.conn.connect((host, port))
- self.connected = True
+ if self.connected is False:
+ self.init_connection()
+ self.conn.connect((host, port))
+ self.connected = True
+ return True
+ else:
+ print("Connection is already active")
+ return False
def disconnect(self):
- self.conn.close()
- self.connected = False
+ if self.connected is True:
+ self.conn.close()
+ self.connected = False
+ return True
+ else:
+ print("There is not an active connection")
+ return False
+
+ def is_connected(self):
+ return self.connected
# Recieves a json struct as a string
def query(self, query, blob_array=[]):
diff --git a/config-vdms.json b/config-vdms.json
index 0d1e5fb0..40b29d7c 100755
--- a/config-vdms.json
+++ b/config-vdms.json
@@ -6,7 +6,9 @@
// "backup_path":"backups_test", // set this if you want different path to store the back up file
"db_root_path": "db",
"backup_flag" : "false",
- "storage_type": "local", //local, aws, etc
+ "storage_type": "local", //local, aws
+ // 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
+ "use_endpoint": false,
"bucket_name": "minio-bucket",
"more-info": "github.com/IntelLabs/vdms"
}
diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile
index ba4a1101..242937ec 100644
--- a/docker/base/Dockerfile
+++ b/docker/base/Dockerfile
@@ -1,87 +1,139 @@
#Copyright (C) 2023 Intel Corporation
#SPDX-License-Identifier: MIT
-ARG BASE_VERSION=11.7-slim
+ARG BASE_VERSION=11.8-slim
ARG BUILD_THREADS="-j16"
-
-FROM debian:${BASE_VERSION}
-
+############################################################
+# BASE IMAGE W/ ENV VARS
+FROM debian:${BASE_VERSION} as base
# Dockerfile limitations force a repetition of global args
ARG BUILD_THREADS
+ENV DEBIAN_FRONTEND=noninteractive
+ENV DEBCONF_NOWARNINGS="yes"
+ENV PROTOBUF_VERSION="24.2"
+ENV NUMPY_MIN_VERSION="1.26.0"
+
+############################################################
+# BUILD DEPENDENCIES
+FROM base as build
+
# Install Packages
-RUN apt-get update -y && apt-get upgrade -y && apt-get install -y --no-install-suggests --no-install-recommends \
- apt-transport-https autoconf automake bison build-essential bzip2 ca-certificates \
- curl ed flex g++-9 gcc-9 git gnupg-agent javacc libarchive-tools libatlas-base-dev \
- libavcodec-dev libavformat-dev libboost-all-dev libbz2-dev libc-ares-dev libcurl4-openssl-dev \
- libdc1394-22-dev libgflags-dev libgoogle-glog-dev libgtk-3-dev libgtk2.0-dev \
- libhdf5-dev libjpeg-dev libjpeg62-turbo-dev libjsoncpp-dev libleveldb-dev liblmdb-dev \
- liblz4-dev libopenblas-dev libopenmpi-dev libpng-dev librdkafka-dev libsnappy-dev libssl-dev \
- libswscale-dev libtbb-dev libtbb2 libtiff-dev libtiff5-dev libtool libzmq3-dev linux-libc-dev mpich \
- openjdk-11-jdk-headless pkg-config procps python3-dev python3-pip software-properties-common \
- swig unzip uuid-dev && \
+# hadolint ignore=DL3008
+RUN apt-get update -y && apt-get upgrade -y && \
+ apt-get install -y --no-install-suggests --no-install-recommends --fix-missing \
+ apt-transport-https autoconf automake bison build-essential bzip2 ca-certificates \
+ curl ed flex g++-9 gcc-9 git gnupg-agent javacc libarchive-tools libatlas-base-dev \
+ libavcodec-dev libavformat-dev libboost-all-dev libbz2-dev libc-ares-dev libcurl4-openssl-dev \
+ libdc1394-22-dev libgflags-dev libgoogle-glog-dev libgtk-3-dev libgtk2.0-dev \
+ libhdf5-dev libjpeg-dev libjpeg62-turbo-dev libjsoncpp-dev libleveldb-dev liblmdb-dev \
+ liblz4-dev libopenblas-dev libopenmpi-dev libpng-dev librdkafka-dev libsnappy-dev libssl-dev \
+ libswscale-dev libtbb-dev libtbb2 libtiff-dev libtiff5-dev libtool libzmq3-dev linux-libc-dev mpich \
+ openjdk-11-jdk-headless pkg-config procps python3-dev python3-pip software-properties-common \
+ swig unzip uuid-dev && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 1 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 1 && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
ln -s /usr/bin/python3 /usr/bin/python
# Pull and Install Dependencies
-ENV CMAKE_VERSION="v3.27.2" \
- PROTOBUF_VERSION="24.2" \
- OPENCV_VERSION="4.5.5" \
- FAISS_VERSION="v1.7.3" \
+WORKDIR /dependencies
+ENV CMAKE_VERSION="v3.27.2" \
VALIJSON_VERSION="v0.6" \
- AWS_SDK_VERSION="1.11.0" \
- TILEDB_VERSION="2.14.1"
+ FAISS_VERSION="v1.7.3" \
+ OPENCV_VERSION="4.5.5" \
+ TILEDB_VERSION="2.14.1" \
+ AWS_SDK_VERSION="1.11.0"
-WORKDIR /dependencies
-RUN pip install --no-cache-dir "numpy>=1.25.1" "coverage>=7.2.7" && \
- git clone --branch ${CMAKE_VERSION} https://github.com/Kitware/CMake.git && \
- cd CMake && ./bootstrap && make ${BUILD_THREADS} && make install && cd /dependencies/ && \
- git clone --branch ${FAISS_VERSION} https://github.com/facebookresearch/faiss.git && \
- cd /dependencies/faiss && mkdir build && cd build && \
- cmake -DFAISS_ENABLE_GPU=OFF -DPython_EXECUTABLE=/usr/bin/python3 .. && \
- make ${BUILD_THREADS} && make install && cd /dependencies/ && \
- git clone https://github.com/tonyzhang617/FLINNG.git && \
- cd /dependencies/FLINNG && mkdir build && cd build && cmake .. && \
- make ${BUILD_THREADS} && make install && cd /dependencies && \
- git clone -b v${PROTOBUF_VERSION} --recursive https://github.com/protocolbuffers/protobuf.git && \
+# hadolint ignore=DL3003
+RUN python3 -m pip install --no-cache-dir "numpy>=${NUMPY_MIN_VERSION}" && \
+ git clone --branch ${VALIJSON_VERSION} https://github.com/tristanpenman/valijson.git /dependencies/valijson && \
+ cd /dependencies/valijson && cp -r include/* /usr/local/include/ && \
+ mkdir -p /opt/dist/usr/local/include/ && cp -r include/* /opt/dist/usr/local/include/
+
+# hadolint ignore=DL3003,SC2086
+RUN git clone --branch ${CMAKE_VERSION} https://github.com/Kitware/CMake.git /dependencies/CMake && \
+ cd /dependencies/CMake && ./bootstrap && make ${BUILD_THREADS} && \
+ make install DESTDIR=/opt/dist && make install
+
+# PROTOBUF & ITS DEPENDENCIES
+# hadolint ignore=DL3003,SC2086
+RUN git clone -b "v${PROTOBUF_VERSION}" --recurse-submodules https://github.com/protocolbuffers/protobuf.git /dependencies/protobuf && \
cd /dependencies/protobuf/third_party/googletest && mkdir build && cd build/ && \
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_GMOCK=ON -DCMAKE_CXX_STANDARD=17 .. && \
- make ${BUILD_THREADS} && make install && ldconfig && \
- cd ../../abseil-cpp && mkdir build && cd build && \
+ make ${BUILD_THREADS} && make install DESTDIR=/opt/dist && make install && ldconfig && \
+ cd /dependencies/protobuf/third_party/abseil-cpp && mkdir build && cd build && \
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/ -DABSL_BUILD_TESTING=ON \
-DABSL_ENABLE_INSTALL=ON -DABSL_USE_EXTERNAL_GOOGLETEST=ON -DABSL_FIND_GOOGLETEST=ON -DCMAKE_CXX_STANDARD=17 .. && \
- make ${BUILD_THREADS} && make install && \
+ make ${BUILD_THREADS} && make install DESTDIR=/opt/dist && make install && \
cd /dependencies/protobuf && \
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=17 \
-Dprotobuf_ABSL_PROVIDER=package -DCMAKE_PREFIX_PATH=/usr/local . && \
- make ${BUILD_THREADS} && make install && \
- python3 -m pip install --no-cache-dir "protobuf==4.${PROTOBUF_VERSION}" && cd /dependencies && \
- git clone --branch ${OPENCV_VERSION} https://github.com/opencv/opencv.git && \
- cd opencv && mkdir build && cd build && cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF .. && \
- make ${BUILD_THREADS} && make install && cd /dependencies/ && \
- git clone --branch ${VALIJSON_VERSION} https://github.com/tristanpenman/valijson.git && \
- cd valijson && cp -r include/* /usr/local/include/ && cd /dependencies && \
- curl -L -o /dependencies/${TILEDB_VERSION}.tar.gz \
+ make ${BUILD_THREADS} && make install DESTDIR=/opt/dist && make install
+
+# DESCRIPTOR LIBRARIES
+# hadolint ignore=DL3003,SC2086
+RUN git clone --branch ${FAISS_VERSION} https://github.com/facebookresearch/faiss.git /dependencies/faiss && \
+ cd /dependencies/faiss && mkdir build && cd build && \
+ cmake -DFAISS_ENABLE_GPU=OFF -DPython_EXECUTABLE=/usr/bin/python3 .. && \
+ make ${BUILD_THREADS} && make install DESTDIR=/opt/dist && make install && \
+ git clone https://github.com/tonyzhang617/FLINNG.git /dependencies/FLINNG && \
+ cd /dependencies/FLINNG && mkdir build && cd build && cmake .. && \
+ make ${BUILD_THREADS} && make install DESTDIR=/opt/dist && make install
+
+# TILEDB & AWS S3 SDK
+# hadolint ignore=DL3003,SC2086
+RUN curl -L -o /dependencies/${TILEDB_VERSION}.tar.gz \
https://github.com/TileDB-Inc/TileDB/archive/refs/tags/${TILEDB_VERSION}.tar.gz && \
cd /dependencies/ && tar -xvf ${TILEDB_VERSION}.tar.gz && cd TileDB-${TILEDB_VERSION} && \
mkdir build && cd build && ../bootstrap --prefix=/usr/local/ && make ${BUILD_THREADS} && \
- make install-tiledb && cd /dependencies && \
- git clone -b ${AWS_SDK_VERSION} --recurse-submodules https://github.com/aws/aws-sdk-cpp && \
- mkdir -p aws-sdk-cpp/build && cd aws-sdk-cpp/build && \
+ make install-tiledb DESTDIR=/opt/dist && make install-tiledb && \
+ git clone -b ${AWS_SDK_VERSION} --recurse-submodules https://github.com/aws/aws-sdk-cpp /dependencies/aws-sdk-cpp && \
+ mkdir -p /dependencies/aws-sdk-cpp/build && cd /dependencies/aws-sdk-cpp/build && \
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local/ -DCMAKE_INSTALL_PREFIX=/usr/local/ \
-DBUILD_ONLY="s3" -DCUSTOM_MEMORY_MANAGEMENT=OFF -DENABLE_TESTING=OFF && \
- make ${BUILD_THREADS} && make install && \
- rm -rf /dependencies /usr/local/share/doc /usr/local/share/man
+ make ${BUILD_THREADS} && make install DESTDIR=/opt/dist && make install
+
+# OPENCV
+# hadolint ignore=DL3003,SC2086
+RUN git clone --branch ${OPENCV_VERSION} https://github.com/opencv/opencv.git /dependencies/opencv && \
+ cd /dependencies/opencv && mkdir build && cd build && cmake -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF .. && \
+ make ${BUILD_THREADS} && make install DESTDIR=/opt/dist && make install
+
+# CLEANUP
+RUN rm -rf /dependencies /usr/local/share/doc /usr/local/share/man && \
+ mkdir -p /opt/dist/usr/include/x86_64-linux-gnu && \
+ cp -rp /usr/include/x86_64-linux-gnu /opt/dist/usr/include/x86_64-linux-gnu
+
+############################################################
+# FINAL IMAGE
+FROM base
+
+# hadolint ignore=DL3008
+RUN apt-get update -y && apt-get upgrade -y && \
+ apt-get install -y --no-install-suggests --no-install-recommends --fix-missing \
+ build-essential bzip2 curl g++-9 gcc-9 git javacc libarchive-tools libavcodec-dev libavformat-dev libcurl4-openssl-dev \
+ libdc1394-22-dev libgoogle-glog-dev libgtk-3-dev libgtk2.0-dev libhdf5-dev libjpeg-dev libjpeg62-turbo-dev libjsoncpp-dev libopenblas-dev \
+ libpng-dev librdkafka-dev libssl-dev libswscale-dev libtbb-dev libtbb2 libtiff-dev libtiff5-dev libzmq3-dev openjdk-11-jdk-headless procps python3-dev python3-pip && \
+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 1 && \
+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 1 && \
+ apt-get clean && rm -rf /var/lib/apt/lists/* && \
+ ln -s /usr/bin/python3 /usr/bin/python && \
+ python3 -m pip install --no-cache-dir "numpy>=${NUMPY_MIN_VERSION}" "coverage>=7.3.1" "protobuf==4.${PROTOBUF_VERSION}"
+COPY --from=build /opt/dist /
+RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/all-libs.conf && ldconfig
# VDMS
WORKDIR /vdms
+# hadolint ignore=DL3003,SC2086
RUN git clone -b develop --recurse-submodules https://github.com/IntelLabs/vdms.git /vdms && \
- mkdir -p /vdms/build && cd /vdms/build && cmake .. && make ${BUILD_THREADS} && \
+ mkdir -p /vdms/build && cd /vdms/build && \
+ cmake .. && make ${BUILD_THREADS} && \
cp /vdms/config-vdms.json /vdms/build/ && \
echo '#!/bin/bash' > /start.sh && echo 'cd /vdms/build' >> /start.sh && \
echo './vdms' >> /start.sh && chmod 755 /start.sh
+ENV PYTHONPATH=/vdms/client/python:${PYTHONPATH}
+HEALTHCHECK CMD echo "This is a healthcheck test." || exit 1
CMD ["/start.sh"]
diff --git a/include/VDMSConfigHelper.h b/include/VDMSConfigHelper.h
new file mode 100644
index 00000000..1b7a760b
--- /dev/null
+++ b/include/VDMSConfigHelper.h
@@ -0,0 +1,60 @@
+
+/**
+ * @file VDMSConfigHelper.h
+ *
+ * @section LICENSE
+ *
+ * The MIT License
+ *
+ * @copyright Copyright (c) 2023 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+#pragma once
+#include
+#include
+#include
+#include