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.yml file and save it as docker-compose.yml:

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

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

Alternatively, you can pass the license as a Base64 string via the environment variable REGULA_LICENSE, rather than using the path to the license file:

docker run -d -p 41101:41101 -e REGULA_LICENSE="<BASE64_STRING>" regulaforensics/face-api:latest
docker run -d -p 41101:41101 -e REGULA_LICENSE="<BASE64_STRING>" regulaforensics/face-api:latest
docker run -d -p 41101:41101 -e REGULA_LICENSE="<BASE64_STRING>" regulaforensics/face-api:latest

where <BASE64_STRING> is your license in the Base64 format.

3. To start FaceAPI with liveness, invoke:

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

4. Checking the status:

sudo docker compose ps
NAME                            COMMAND                  SERVICE             STATUS              PORTS
db-postgres                     "/opt/bitnami/script…"   db-postgres         running             0.0.0.0:5432->5432/tcp
faceapi                         "./entrypoint.sh"        faceapi             running             0.0.0.0:41101->41101/tcp
minio                           "/usr/bin/docker-ent…"   minio               running (healthy)   0.0.0.0:9000-9001->9000-9001/tcp

5. To stop FaceAPI with liveness, run:

sudo docker compose down

6. 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.yml and save it as docker-compose.yml:

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

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

Alternatively, you can pass the license as Base64 string via the environment variable REGULA_LICENSE, rather than using the path to the license file:

docker run -d -p 41101:41101 -e REGULA_LICENSE="<BASE64_STRING>" regulaforensics/face-api:latest
docker run -d -p 41101:41101 -e REGULA_LICENSE="<BASE64_STRING>" regulaforensics/face-api:latest
docker run -d -p 41101:41101 -e REGULA_LICENSE="<BASE64_STRING>" regulaforensics/face-api:latest

where <BASE64_STRING> is your license in the Base64 format.

3. 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

4. Checking the status:

sudo docker compose ps
NAME                            COMMAND                  SERVICE             STATUS              PORTS
db-postgres                     "/opt/bitnami/script…"   db-postgres         running             0.0.0.0:5432->5432/tcp
faceapi                         "./entrypoint.sh"        faceapi             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:9091->9091/tcp, 0.0.0.0:19530->19530/tcp

5. To stop FaceAPI with identification, run:

sudo docker compose down

6. 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.yml and save it as docker-compose.yml:

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

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

Alternatively, you can pass the license as Base64 string via the environment variable REGULA_LICENSE, rather than using the path to the license file:

docker run -d -p 41101:41101 -e REGULA_LICENSE="<BASE64_STRING>" regulaforensics/face-api:latest
docker run -d -p 41101:41101 -e REGULA_LICENSE="<BASE64_STRING>" regulaforensics/face-api:latest
docker run -d -p 41101:41101 -e REGULA_LICENSE="<BASE64_STRING>" regulaforensics/face-api:latest

where <BASE64_STRING> is your license in the Base64 format.

3. To start FaceAPI, invoke:

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

4. Checking the status:

sudo docker compose ps
NAME                            COMMAND                  SERVICE             STATUS              PORTS
db-postgres                     "/opt/bitnami/script…"   db-postgres         running             0.0.0.0:5432->5432/tcp
faceapi                         "./entrypoint.sh"        faceapi             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:9091->9091/tcp, 0.0.0.0:19530->19530/tcp

5. To stop FaceAPI, run:

sudo docker compose down

6. To delete data after stopping FaceAPI, invoke:

sudo docker compose down -v