Docker Image

To download the latest docker image and run the VDMS Server:

# On Linux to use host network
docker run --net=host -d intellabs/vdms:latest

# To map only host port 55555 to internal VDMS port 55555
docker run -p 55555:55555 -d intellabs/vdms:latest

The VDMS server will be listening to connection on its default TCP port (55555).

Please visit DockerHub to see available tags.

Persisting Data using Docker Image

In some cases, user may need for data to persist if docker container is shutdown. In this case, use the following to run the VDMS Server:

mkdir -p db
docker run -p 55555:55555 -d --mount type=bind,source=${PWD}/db,target=/db \
-e OVERRIDE_db_root_path=/db intellabs/vdms:latest

This creates a directory db in the current directory and mounts it to /db within the container which is used to store VDMS data.

When using descriptors, be sure to update the index. This can be done by running the following using the VDMS Python Client before shutting down the VDMS server:

import vdms

db = vdms.vdms()
db.connect()

query = [
    {
        "FindDescriptorSet": {
            "set": collection_name,
            "storeIndex": True  # Update Index
        }
    }
]
response, _ = db.query(query)

To start a new VDMS server, using the persisted data, use the same command as before:

docker run -p 55555:55555 -d --mount type=bind,source=${PWD}/db,target=/db \
-e OVERRIDE_db_root_path=/db intellabs/vdms:latest

Environment Variable in Docker Containers

As of v2.8.0, users now have the ability to override the default parameters in config-vdms.json. Users can specify the newer parameters as an environment variable into the docker container using the prefix OVERRIDE_. For example, to override the autodelete_interval_s parameter, you can use the following:

docker run -d --net=host -e OVERRIDE_autodelete_interval_s=60 intellabs/vdms:v2.8.0

Read-Only Docker Image

To run VDMS in a read-only container, first create a volume

docker volume create vdms_db

Now create a VDMS container that uses this volume as the storage location for db's

docker run -d -p 55555:55555 --read-only --mount source=vdms_db,destination=/vdms/build/db intellabs/vdms:latest