Skip to content

Advanced Installation: Docker

Advanced setup is based on the integration with PostgreSQL DB & Milvus vector database.

Before starting the installation, note that as Milvus is quite demanding, you need to plan the infrastructure in advance. Before you install Milvus, check whether your hardware and software meet the Docker prerequisites.

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

To install Docker Compose, refer to the official Docker guide.

Face Liveness

Includes Face Detection, Face Comparison 1:1, Liveness Assessment.

1. Download the liveness-docker-compose.yaml file and save it as docker-compose.yaml:

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

2. Download the config-liveness.yaml file into the same folder where the downloaded docker-compose.yaml is located and save it as config.yaml:

wget https://docs.regulaforensics.com/develop/face-sdk/web-service/installation/files/config-liveness.yaml -O config.yaml

3. To set the license, place the regula.license file into the same folder where the previously downloaded files are located.

4. To start FaceAPI with liveness, invoke:

sudo docker compose up -d
[+] Running 4/4
 ✔ Network regula_faceapi-network          Created  
 ✔ Volume "regula_postgre-data"            Created 
 ✔ Container db-postgres                   Started
 ✔ Container faceapi                       Started

5. Checking the status:

sudo docker compose ps
NAME                            COMMAND                  SERVICE             STATUS                PORTS
db-postgres                     "/opt/bitnami/script…"   db-postgres         About a minute        0.0.0.0:5432->5432/tcp
faceapi                         "./entrypoint.sh"        faceapi             About a minute        0.0.0.0:41101->41101/tcp

6. To stop FaceAPI with liveness, run:

sudo docker compose down

7. To delete data after stopping FaceAPI with liveness, invoke:

sudo docker compose down -v

Face Identification

Includes Face Detection, Face Comparison 1:1, Face Comparison 1:N.

1. Download identification-docker-compose.yaml and save it as docker-compose.yaml:

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

2. Download the config-identification.yaml file into the same folder where the downloaded docker-compose.yaml is located and save it as config.yaml:

wget https://docs.regulaforensics.com/develop/face-sdk/web-service/installation/files/config-identification.yaml -O config.yaml

3. To set the license, place the regula.license file into the same folder where the previous downloaded files are located.

4. To start FaceAPI with identification, invoke:

sudo docker compose up -d
[+] Running 11/11
 ✔ Network regula_faceapi-network          Created
 ✔ Volume "regula_postgre-data"            Created
 ✔ Volume "regula_minio-data"              Created
 ✔ Volume "regula_etcd-data"               Created
 ✔ Volume "regula_milvus-data"             Created
 ✔ Container milvus-etcd                   Started
 ✔ Container db-postgres                   Started
 ✔ Container milvus-minio                  Started
 ✔ Container milvus-standalone             Started
 ✔ Container milvus-attu                   Started
 ✔ Container faceapi                       Started

5. Checking the status:

sudo docker compose ps
NAME                            COMMAND                  SERVICE             STATUS                     PORTS
db-postgres                     "/opt/bitnami/script…"   db-postgres         About a minute             0.0.0.0:5432->5432/tcp
faceapi                         "./entrypoint.sh"        faceapi             About a minute             0.0.0.0:41101->41101/tcp
milvus-attu                     "docker-entrypoint.s…"   attu                About a minute             0.0.0.0:3000->3000/tcp
milvus-etcd                     "etcd -advertise-cli…"   etcd                About a minute             2379-2380/tcp
milvus-minio                    "/usr/bin/docker-ent…"   minio               About a minute (healthy)   0.0.0.0:9000-9001->9000-9001/tcp
milvus-standalone               "/tini -- milvus run…"   milvus-standalone   About a minute             0.0.0.0:9091->9091/tcp, 0.0.0.0:19530->19530/tcp

6. To stop FaceAPI with identification, run:

sudo docker compose down

7. To delete data after stopping FaceAPI with identification, invoke:

sudo docker compose down -v

Full Functionality

1. To use the full functionality of our FaceAPI Web Service, download full-docker-compose.yaml and save it as docker-compose.yaml:

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

2. Download the config-full.yaml file into the same folder where the downloaded docker-compose.yaml is located and save it as config.yaml:

wget https://docs.regulaforensics.com/develop/face-sdk/web-service/installation/files/config-full.yaml -O config.yaml

3. To set the license, place the regula.license file into the same folder where the previous downloaded files are located.

4. To start FaceAPI with full functionality, invoke:

sudo docker compose up -d
[+] Running 11/11
 ✔ Network regula_faceapi-network          Created
 ✔ Volume "regula_postgre-data"            Created
 ✔ Volume "regula_minio-data"              Created
 ✔ Volume "regula_etcd-data"               Created
 ✔ Volume "regula_milvus-data"             Created
 ✔ Container milvus-etcd                   Started
 ✔ Container db-postgres                   Started
 ✔ Container milvus-minio                  Started
 ✔ Container milvus-standalone             Started
 ✔ Container milvus-attu                   Started
 ✔ Container faceapi                       Started

5. Checking the status:

sudo docker compose ps
NAME                            COMMAND                  SERVICE             STATUS                     PORTS
db-postgres                     "/opt/bitnami/script…"   db-postgres         About a minute             0.0.0.0:5432->5432/tcp
faceapi                         "./entrypoint.sh"        faceapi             About a minute             0.0.0.0:41101->41101/tcp
milvus-attu                     "docker-entrypoint.s…"   attu                About a minute             0.0.0.0:3000->3000/tcp
milvus-etcd                     "etcd -advertise-cli…"   etcd                About a minute             2379-2380/tcp
milvus-minio                    "/usr/bin/docker-ent…"   minio               About a minute (healthy)   0.0.0.0:9000-9001->9000-9001/tcp
milvus-standalone               "/tini -- milvus run…"   milvus-standalone   About a minute             0.0.0.0:9091->9091/tcp, 0.0.0.0:19530->19530/tcp

6. To stop FaceAPI with full functionality, run:

sudo docker compose down

7. To delete data after stopping FaceAPI with full functionality, invoke:

sudo docker compose down -v