Skip to content

Advanced Installation

Advanced setup is based on the integration with PostgreSQL DB & Milvus vector database. For basic setup, visit the Basic Installation page.

Before you install Milvus, check your hardware and software to see if they meet the requirements:

For further performance and integration fine tuning, refer to the official Milvus documentation.

To install Docker Compose, refer to the official guide

Standalone Milvus

Download standalone-docker-compose.yml and save it as docker-compose.yml:

wget https://docs.regulaforensics.com/develop/face-sdk/web-service/installation/files/standalone-docker-compose.yml -O docker-compose.yml

To set the license, place the regula.license file into the same folder where the downloaded docker-compose.yml is located.

To start FaceAPI, invoke:

sudo docker-compose up -d
[+] Running 12/12
⠿ Network regula_face-api-network          Created
⠿ Volume "regula_postgre-data"             Created
⠿ Volume "regula_etcd-data"                Created
⠿ Volume "regula_minio-data"               Created
⠿ Volume "regula_milvus-data"              Created
⠿ Container milvus-minio                   Started
⠿ Container milvus-etcd                    Started
⠿ Container postgres-db                    Started
⠿ Container face-api-service               Started
⠿ Container milvus-standalone              Started
⠿ Container regula-create-buckets-1        Started
⠿ Container milvus-attu                    Started

Check the status:

sudo docker-compose ps
NAME                            COMMAND                  SERVICE             STATUS              PORTS
regula-create-buckets-1   "/bin/sh -c ' /usr/b…"   create-buckets      exited (0)
face-api-service                "./entrypoint.sh"        face-api            running             0.0.0.0:41101->41101/tcp
milvus-attu                     "docker-entrypoint.s…"   attu                running             0.0.0.0:3000->3000/tcp
milvus-etcd                     "etcd -advertise-cli…"   etcd                running             2379-2380/tcp
milvus-minio                    "/usr/bin/docker-ent…"   minio               running (healthy)   0.0.0.0:9000-9001->9000-9001/tcp
milvus-standalone               "/tini -- milvus run…"   milvus-standalone   running             0.0.0.0:19530->19530/tcp
postgres-db                     "/opt/bitnami/script…"   db-postgres         running             5432/tcp

To stop FaceAPI, run:

sudo docker-compose down

To delete data after stopping FaceAPI:

sudo docker-compose down -v

Cluster Milvus

Download cluster-docker-compose.yml and save it as docker-compose.yml:

wget https://docs.regulaforensics.com/develop/face-sdk/web-service/installation/files/cluster-docker-compose.yml -O docker-compose.yml

To set the license, place the regula.license file to the same folder where the downloaded docker-compose.yml is located.

Start FaceAPI:

sudo docker-compose up -d
[+] Running 20/20
⠿ Network regula_face-api-network          Created
⠿ Volume "regula_etcd-data"                Created
⠿ Volume "regula_pulsar-data"              Created
⠿ Volume "regula_postgre-data"             Created
⠿ Volume "regula_minio-data"               Created
⠿ Container milvus-etcd                    Started
⠿ Container milvus-pulsar                  Started
⠿ Container postgres-db                    Started
⠿ Container milvus-proxy                   Started
⠿ Container milvus-minio                   Started
⠿ Container face-api-service               Started
⠿ Container milvus-attu                    Started
⠿ Container regula-create-buckets-1        Started
⠿ Container milvus-datacoord               Started
⠿ Container milvus-indexcoord              Started
⠿ Container milvus-querycoord              Started
⠿ Container milvus-rootcoord               Started
⠿ Container milvus-querynode               Started
⠿ Container milvus-datanode                Started
⠿ Container milvus-indexnode               Started

Check the status:

sudo docker-compose ps
NAME                            COMMAND                  SERVICE             STATUS              PORTS
compose-test-create-buckets-1   "/bin/sh -c ' /usr/b…"    create-buckets      exited (0)
face-api-service                "./entrypoint.sh"         face-api            running             0.0.0.0:41101->41101/tcp
milvus-attu                     "docker-entrypoint.s…"    attu                running             0.0.0.0:3000->3000/tcp
milvus-datacoord                "/tini -- milvus run…"    datacoord           running
milvus-datanode                 "/tini -- milvus run…"    datanode            running
milvus-etcd                     "etcd -advertise-cli…"    etcd                running             2379-2380/tcp
milvus-indexcoord               "/tini -- milvus run…"    indexcoord          running
milvus-indexnode                "/tini -- milvus run…"    indexnode           running
milvus-minio                    "/usr/bin/docker-ent…"    minio               running (healthy)   0.0.0.0:9000-9001->9000-9001/tcp
milvus-proxy                    "/tini -- milvus run…"    proxy               running             0.0.0.0:19530->19530/tcp
milvus-pulsar                   "/bin/bash -c '\nbin/…"   pulsar              running
milvus-querycoord               "/tini -- milvus run…"    querycoord          running
milvus-querynode                "/tini -- milvus run…"    querynode           running
milvus-rootcoord                "/tini -- milvus run…"    rootcoord           running
postgres-db                     "/opt/bitnami/script…"    db-postgres         running             5432/tcp

To stop FaceAPI, run:

sudo docker-compose down

To delete data after stopping FaceAPI:

sudo docker-compose down -v

Standalone Milvus

Download an example standalone-values.yaml file:

wget https://docs.regulaforensics.com/develop/face-sdk/web-service/installation/files/standalone-values.yaml

Create secret from regula.license file:

kubectl create secret generic face-api-license --from-file=regula.license

Note

regula.license file should be located in the folder, where kubectl create secret command is executed

To install the chart with the release name my-release:

helm install my-release regulaforensics/faceapi -f standalone-values.yaml

Cluster Milvus

Download an example cluster-values.yaml file:

wget https://docs.regulaforensics.com/develop/face-sdk/web-service/installation/files/cluster-values.yaml

Create secret from regula.license file:

kubectl create secret generic face-api-license --from-file=regula.license

Note

regula.license file should be located in the folder, where kubectl create secret command is executed

To install the chart with the release name my-release:

helm install my-release regulaforensics/faceapi -f cluster-values.yaml

GPU version

The GPU version has dramatically higher performance in comparison with the CPU version.

Prerequisites

version: gpu

resources:
  requests:
    nvidia.com/gpu: 1
  limits:
    nvidia.com/gpu: 1

External Dependencies

FaceAPI can be configured to use external dependencies.

External PostgreSQL

External PostgreSQL can be configured via the following values:

  1. externalPostgreSQL (e.g. postgresql://user:pass@host:5432/database)

  2. externalPostgreSQLSecret - (e.g. postgresql://user:pass@host:5432/database value taken from secret - secure way)