Skip to content

How to Install Face API SDK on Linux

Processing versions types

  • CPU
  • GPU

Prerequisites

To install the Face SDK, you need to have a 64-bit version of one of these OS versions:

Ubuntu

  • Ubuntu 16.04 (Xenial Xerus) - supports Face SDK up to version 3.2
  • Ubuntu 18.04 (Bionic Beaver)
  • Ubuntu 20.04 (Focal Fossa)
  • Ubuntu 22.04 (Jammy Jellyfish)

Debian

  • Debian 9 (Stretch) - supports Face SDK up to version 3.2
  • Debian 10 (Buster) - supports Basic Installation and Face Liveness
  • Debian 11 (Bullseye) - supports Basic and all Advanced Installations

CentOS

  • CentOS Stream 8
  • CentOS Stream 9

Info

The SDK is supported on x86_64 or (amd64) architectures.

Available packages

Face SDK Web API service is distributed via following packages:

  • face-rec-service-cpu
  • face-rec-service-gpu

GPU package prerequisites

  • Install CUDA 11.8.0. Find the basic installation instructions in the NVIDIA CUDA documentation. Read on for more detailed instructions.
  • Install NVIDIA graphics drivers (version >= 520.61.05). You can install drivers on your Linux system along with packages mentioned above or use the NVIDIA Driver Installation Guide.
  • Install cuDNN 8.6.0.163. Find the step-by-step instructions on how to install cuDNN in the NVIDIA cuDNN Installation Guide.

Installing over older version

When upgrading the SDK, it's important to consider how the new version will handle the existing configuration files.

In the command line, if you select Y or I during installation, the configuration files are updated to use the new Face SDK version. However, the old .env file is preserved and renamed to .env.dpkg-old.

If N or O (default installation) is selected, the old .env file is used to configure the new version, and the new file is saved under the name .env.dpkg-dist. The option D displays the difference between the files, while Z launches shell.

To automate the installation process, the following command can be used:

yes I | sudo dpkg -i face-rec-service-cpu-5.2.deb

In the command line, if you select Y or I during installation, the configuration files are updated to use the new Face SDK version. However, the old .env file is preserved and renamed to .env.dpkg-old.

If N or O (default installation) is selected, the old .env file is used to configure the new version, and the new file is saved under the name .env.dpkg-dist. The option D displays the difference between the files, while Z launches shell.

To automate the installation process, the following command can be used:

yes I | sudo dpkg -i face-rec-service-cpu-5.2.deb

When installing the rmp package on CentOS, the old configuration file .env is preserved, and the new file is saved as .env.rpmnew. You can configure the new version without losing any previous changes.

Basic Installation

Install using the repository

To set up the repository, update the apt package index and install packages to allow apt using the repository over HTTPS:

sudo apt-get update
sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

Add the Regula official GPG key:

curl -fsSL https://downloads.regulaforensics.com/repo/ubuntu/regula.gpg | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/regula.gpg --import
sudo chmod 644 /etc/apt/trusted.gpg.d/regula.gpg

Use the following command to set up the stable repository:

sudo add-apt-repository \
    "deb [arch=amd64] https://downloads.regulaforensics.com/repo/ubuntu \
    $(lsb_release -cs) \
    stable"

Update the apt package index and install the latest version of the SDK, or go to the next step to install a specific version:

sudo apt-get update
sudo apt-get install face-rec-service-cpu
sudo apt-get install face-rec-service-gpu

To install a specific version of the SDK, list the available versions in the repo, then select and install the required version.

a. List the versions available in your repo:

apt-cache madison face-rec-service-cpu
apt-cache madison face-rec-service-gpu

b. Install a specific version using the version string from the second column:

sudo apt-get install face-rec-service-cpu=<VERSION>
sudo apt-get install face-rec-service-gpu=<VERSION>

To set up the repository, update the apt package index and install packages to allow apt using the repository over HTTPS:

sudo apt-get update
sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

Add the Regula official GPG key:

curl -fsSL https://downloads.regulaforensics.com/repo/debian/regula.gpg | sudo apt-key add -

Use the following command to set up the stable repository:

sudo add-apt-repository \
    "deb [arch=amd64] https://downloads.regulaforensics.com/repo/debian \
    $(lsb_release -cs) \
    stable"

Update the apt package index and install the latest version of the SDK, or go to the next step to install a specific version:

sudo apt-get update
sudo apt-get install face-rec-service-cpu
sudo apt-get install face-rec-service-gpu

To install a specific version of the SDK, list the available versions in the repo, then select and install the required version.

a. List the versions available in your repo:

apt-cache madison face-rec-service-cpu
apt-cache madison face-rec-service-gpu

b. Install a specific version using the version string from the second column:

sudo apt-get install face-rec-service-cpu=<VERSION>
sudo apt-get install face-rec-service-gpu=<VERSION>

To set up the repository, install the yum-utils package (which provides the yum-config-manager utility) and set up the stable repository.

sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://downloads.regulaforensics.com/repo/centos/regula.repo

Install the latest version of the SDK or go to the next step to install a specific version:

sudo yum install face-rec-service-cpu
sudo yum install face-rec-service-gpu

To install a specific version of the SDK, list the available versions in the repo, then select and install the required version.

a. List the versions available in your repo:

sudo yum list face-rec-service-cpu --showduplicates | sort -r
sudo yum list face-rec-service-gpu --showduplicates | sort -r

b. Install a specific version by its fully qualified package name:

sudo yum install face-rec-service-cpu-<VERSION>
sudo yum install face-rec-service-gpu-<VERSION>

Installing from a package

Note

Regula packages require the following dependencies to be installed before the SDK is downloaded: debconf (>= 0.2.26), libusb-1.0-0 (>= 2:1.0.20), udev, pcscd, libccid.

Open https://downloads.regulaforensics.com/repo/ubuntu/pool/stable/f/, browse the required package dir and download the .deb file for the SDK version you want to install:

wget https://downloads.regulaforensics.com/repo/ubuntu/pool/stable/f/face-rec-service-cpu/<package>.deb
wget https://downloads.regulaforensics.com/repo/ubuntu/pool/stable/f/face-rec-service-gpu/<package>.deb

Install the SDK:

sudo dpkg -i <package>.deb

Note

Regula packages require the following dependencies to be installed before the SDK is downloaded: debconf (>= 0.2.26), libusb-1.0-0 (>= 2:1.0.20), udev, pcscd, libccid.

Open https://downloads.regulaforensics.com/repo/debian/pool/stable/f/, browse the required package dir and download the .deb file for the SDK version you want to install:

wget https://downloads.regulaforensics.com/repo/debian/pool/stable/f/face-rec-service-cpu/<package>.deb
wget https://downloads.regulaforensics.com/repo/debian/pool/stable/f/face-rec-service-gpu/<package>.deb

Install the SDK:

sudo dpkg -i <package>.deb

Note

Regula packages require the following dependencies to be installed before SDK is downloaded: libusb, pcsc-lite, libX11.

Open https://downloads.regulaforensics.com/repo/centos/x86_64/stable/Packages/ and download the .rpm file for the SDK version you want to install:

wget https://downloads.regulaforensics.com/repo/centos/x86_64/stable/Packages/<package>.rpm

Install the SDK:

sudo rpm -ivh <package>.rpm

Set license

To access all the capabilities of the Face Web API, you need to set a license.

To obtain the production license or get purchasing information, please submit an inquiry and our sales team will contact you shortly.

Note

Make sure that the regula.license file is located at your user's home directory "$HOME/regula.license".

1. Copy the regula.license file to the following folder:

sudo cp -ar ~/regula.license /opt/regula/face-rec-service/extBin/unix_x64/cpu/
sudo cp -ar ~/regula.license /opt/regula/face-rec-service/extBin/unix_x64/gpu/

2. Restart the Face Web API service:

sudo systemctl restart face-rec-service.service

Advanced Installation

Advanced setup allows you to use the Liveness module, Identification module or both.

  1. To use the Face liveness module, you should install and configure a PostgreSQL DB and an S3 compatible object storage. Also, you should specify FaceApi relevant variables to SQL and Storage.

  2. To use the Face identification module, you should install and configure a PostgreSQL DB, an S3 compatible object storage, and a Milvus vector database. Also, you should specify FaceApi relevant variables to SQL, Storage, and Milvus.

  3. The usage of the full functionality of our FaceAPI web service is based on the Basic installation and integration with a PostgreSQL DB, an S3 compatible object storage, and a Milvus vector database. All variables should be specified for them (SQL, Storage, Milvus).

Face liveness

PostgreSQL

Refer to the Install PostgreSQL with APT on Ubuntu guide.

Configure PostgreSQL:

# Add user `postgres` to sudo group
sudo adduser postgres sudo

# Switch to the `postgres` user:
sudo su - postgres

# Create a DB user `regula` with an example password 'Regulapasswd#1':
createuser regula -d -P

# Create a DB `regula_db`:
createdb regula_db -O regula

Storage

You can use your existing S3 compatible object storage or install Minio storage.

FaceApi

Edit the .env file located at /opt/regula/face-rec-service folder and set liveness variable to "true":

FACEAPI_LIVENESS_GEN_2='true'

then add the following variables:

FACEAPI_SQL_URL='postgresql://regula:Regulapasswd#1@localhost:5432/regula_db'
AWS_ACCESS_KEY_ID='minioadmin'
AWS_SECRET_ACCESS_KEY='minioadmin'
FACEAPI_STORAGE_SESSION_BUCKET_NAME='faceapi-session'
FACEAPI_STORAGE_ENDPOINT='http://localhost:9000'

Restart the Face Web API service:

sudo systemctl restart face-rec-service.service

Verify Face Web API Service:

sudo systemctl status face-rec-service

PostgreSQL

Refer to the Install PostgreSQL with APT on Debian guide.

Configure PostgreSQL:

# Add user `postgres` to sudo group
sudo adduser postgres sudo

# Switch to the `postgres` user:
sudo su - postgres

# Create a DB user `regula` with an example password 'Regulapasswd#1':
createuser regula -d -P

# Create a DB `regula_db`:
createdb regula_db -O regula

Storage

You can use your existing S3 compatible object storage or install Minio storage.

FaceApi

Edit the .env file located at /opt/regula/face-rec-service folder and set liveness variable to "true":

FACEAPI_LIVENESS_GEN_2='true'

then add the following variables:

FACEAPI_SQL_URL='postgresql://regula:Regulapasswd#1@localhost:5432/regula_db'
AWS_ACCESS_KEY_ID='minioadmin'
AWS_SECRET_ACCESS_KEY='minioadmin'
FACEAPI_STORAGE_SESSION_BUCKET_NAME='faceapi-session'
FACEAPI_STORAGE_ENDPOINT='http://localhost:9000'

Restart the Face Web API service:

sudo systemctl restart face-rec-service.service

Verify Face Web API Service:

sudo systemctl status face-rec-service

PostgreSQL

Refer to the Install PostgreSQL with YUM on Centos guide.

Configure PostgreSQL:

# Add user `postgres` to wheel group
sudo usermod -aG wheel postgres

# Switch to the `postgres` user
sudo su - postgres

# Create a DB user `regula` with an example password 'Regulapasswd#1':
createuser regula -d -P

# Create a DB `regula_db`
createdb regula_db -O regula

Storage

You can use your existing S3 compatible object storage or install Minio storage.

FaceApi

Edit the .env file located at /opt/regula/face-rec-service folder and set liveness variable to "true":

FACEAPI_LIVENESS_GEN_2='true'

then add the following variables:

FACEAPI_SQL_URL='postgresql://regula:Regulapasswd#1@localhost:5432/regula_db'
AWS_ACCESS_KEY_ID='minioadmin'
AWS_SECRET_ACCESS_KEY='minioadmin'
FACEAPI_STORAGE_SESSION_BUCKET_NAME='faceapi-session'
FACEAPI_STORAGE_ENDPOINT='http://localhost:9000'

Restart the Face Web API service:

sudo systemctl restart face-rec-service.service

Verify Face Web API Service:

sudo systemctl status face-rec-service

Face identification

PostgreSQL

Refer to the Install PostgreSQL with APT on Ubuntu guide.

Configure PostgreSQL:

# Add user `postgres` to sudo group
sudo adduser postgres sudo

# Switch to the `postgres` user:
sudo su - postgres

# Create a DB user `regula` with an example password 'Regulapasswd#1':
createuser regula -d -P

# Create a DB `regula_db`:
createdb regula_db -O regula

Storage

You can use your existing S3 compatible object storage or install Minio storage.

Milvus

Note

Milvus package require the following dependency to be installed: libopenblas-base.

Download the .deb package that Milvus provides and install Milvus standalone.

wget https://github.com/milvus-io/milvus/releases/download/v2.2.0/milvus_2.2.0-1_amd64.deb
sudo apt-get update
sudo dpkg -i milvus_2.2.0-1_amd64.deb
sudo apt-get -f install

Check the status of Milvus and its dependencies

After installation, Milvus standalone and its dependencies (etcd and MinIO) start automatically. You can check their status:

sudo systemctl status milvus
sudo systemctl status milvus-etcd
sudo systemctl status milvus-minio

Download Minio Client (CLI):

wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo cp -ar mc /usr/bin/

Create a minio bucket:

mc config host add myminio http://localhost:9000 minioadmin minioadmin;
mc rm -r --force myminio/faceapi-person;
mc mb myminio/faceapi-person;

FaceApi

Edit the .env file located at /opt/regula/face-rec-service folder and set identification variable to "true":

FACEAPI_ENABLE_IDENTIFICATION='true'

then add the following variables:

FACEAPI_SQL_URL='postgresql://regula:Regulapasswd#1@localhost:5432/regula_db'
AWS_ACCESS_KEY_ID='minioadmin'
AWS_SECRET_ACCESS_KEY='minioadmin'
FACEAPI_STORAGE_PERSON_BUCKET_NAME='faceapi-person'
FACEAPI_STORAGE_ENDPOINT='http://localhost:9000'

Restart the Face Web API service:

sudo systemctl restart face-rec-service.service

Verify Face Web API Service:

sudo systemctl status face-rec-service

Warning

Face Identification is supported only on Debian 11.

PostgreSQL

Refer to the Install PostgreSQL with APT on Debian guide.

Configure PostgreSQL:

# Add user `postgres` to sudo group
sudo adduser postgres sudo

# Switch to the `postgres` user:
sudo su - postgres

# Create a DB user `regula` with an example password 'Regulapasswd#1':
createuser regula -d -P

# Create a DB `regula_db`:
createdb regula_db -O regula

Storage

You can use your existing S3 compatible object storage or install Minio storage.

Milvus

Note

Milvus package require the following dependency to be installed: libopenblas-base.

Download the .deb package that Milvus provides and install Milvus standalone.

wget https://github.com/milvus-io/milvus/releases/download/v2.2.0/milvus_2.2.0-1_amd64.deb
sudo apt-get update
sudo dpkg -i milvus_2.2.0-1_amd64.deb
sudo apt-get -f install

Check the status of Milvus and its dependencies

After installation, Milvus standalone and its dependencies (etcd and MinIO) start automatically. You can check their status:

sudo systemctl status milvus
sudo systemctl status milvus-etcd
sudo systemctl status milvus-minio

Download Minio Client (CLI):

wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo cp -ar mc /usr/bin/

Create minio bucket:

mc config host add myminio http://localhost:9000 minioadmin minioadmin;
mc rm -r --force myminio/faceapi-person;
mc mb myminio/faceapi-person;

FaceApi

Edit the .env file located at /opt/regula/face-rec-service folder and set identification variable to "true":

FACEAPI_ENABLE_IDENTIFICATION='true'

then add the following variables:

FACEAPI_SQL_URL='postgresql://regula:Regulapasswd#1@localhost:5432/regula_db'
AWS_ACCESS_KEY_ID='minioadmin'
AWS_SECRET_ACCESS_KEY='minioadmin'
FACEAPI_STORAGE_PERSON_BUCKET_NAME='faceapi-person'
FACEAPI_STORAGE_ENDPOINT='http://localhost:9000'

Restart the Face Web API service:

sudo systemctl restart face-rec-service.service

Verify Face Web API Service:

sudo systemctl status face-rec-service

Note

To enable Face Search on CentOS 7, make sure to change the SELinux mode to Permissive:

sudo setenforce 0
getenforce

PostgreSQL

Refer to the Install PostgreSQL with YUM on Centos guide.

Configure PostgreSQL:

# Add user `postgres` to wheel group
sudo usermod -aG wheel postgres

# Switch to the `postgres` user
sudo su - postgres

# Create a DB user `regula` with an example password 'Regulapasswd#1':
createuser regula -d -P

# Create a DB `regula_db`
createdb regula_db -O regula

Storage

You can use your existing S3 compatible object storage or <a href="https://min.io/docs/minio/linux/index.html" target="_blank">install Minio storage</a>.

**Milvus**

Download the .deb package that Milvus provides and install Milvus standalone.

```
sudo yum install https://github.com/milvus-io/milvus/releases/download/v2.2.0/milvus-2.2.0-1.el7.x86_64.rpm
```

Start and check the status of Milvus and its dependencies

```
sudo systemctl start milvus
sudo systemctl start milvus-etcd
sudo systemctl start milvus-minio
```

```
sudo systemctl status milvus
sudo systemctl status milvus-etcd
sudo systemctl status milvus-minio
```

Download Minio Client (CLI):

```
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo cp -ar mc /usr/bin/
```

Create minio bucket:

```
mc config host add myminio http://localhost:9000 minioadmin minioadmin;
mc rm -r --force myminio/faceapi-person;
mc mb myminio/faceapi-person;
```

**FaceApi**

Edit the .env file located at /opt/regula/face-rec-service folder and set identification variable to "true":

```
FACEAPI_ENABLE_IDENTIFICATION='true'
```

then add the following variables:

```
FACEAPI_SQL_URL='postgresql://regula:Regulapasswd#1@localhost:5432/regula_db'
AWS_ACCESS_KEY_ID='minioadmin'
AWS_SECRET_ACCESS_KEY='minioadmin'
FACEAPI_STORAGE_PERSON_BUCKET_NAME='faceapi-person'
FACEAPI_STORAGE_ENDPOINT='http://localhost:9000'
```

Restart the Face Web API service:

```
sudo systemctl restart face-rec-service.service
```

Verify Face Web API Service:

```
sudo systemctl status face-rec-service
```

Full functionality

PostgreSQL

Refer to the Install PostgreSQL with APT on Ubuntu guide.

Configure PostgreSQL:

# Add user `postgres` to sudo group
sudo adduser postgres sudo

# Switch to the `postgres` user:
sudo su - postgres

# Create a DB user `regula` with an example password 'Regulapasswd#1':
createuser regula -d -P

# Create a DB `regula_db`:
createdb regula_db -O regula

Storage

You can use your existing S3 compatible object storage or install Minio storage.

Milvus

Note

The Milvus package requires the libopenblas-base dependency to be installed.

Download the .deb package that Milvus provides and install Milvus standalone.

wget https://github.com/milvus-io/milvus/releases/download/v2.2.0/milvus_2.2.0-1_amd64.deb
sudo apt-get update
sudo dpkg -i milvus_2.2.0-1_amd64.deb
sudo apt-get -f install

Check the status of Milvus and its dependencies

After installation, Milvus standalone and its dependencies (etcd and MinIO) start automatically. You can check their status:

sudo systemctl status milvus
sudo systemctl status milvus-etcd
sudo systemctl status milvus-minio

Download Minio Client (CLI):

wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo cp -ar mc /usr/bin/

Create minio bucket:

mc config host add myminio http://localhost:9000 minioadmin minioadmin;
mc rm -r --force myminio/faceapi-person;
mc rm -r --force myminio/faceapi-session;
mc mb myminio/faceapi-person;
mc mb myminio/faceapi-session;

FaceApi

Edit the .env file located at /opt/regula/face-rec-service folder - set liveness and identification variables to "true":

FACEAPI_ENABLE_IDENTIFICATION='true'
FACEAPI_LIVENESS_GEN_2='true'

then add the following variables:

FACEAPI_SQL_URL='postgresql://regula:Regulapasswd#1@localhost:5432/regula_db'
AWS_ACCESS_KEY_ID='minioadmin'
AWS_SECRET_ACCESS_KEY='minioadmin'
FACEAPI_STORAGE_PERSON_BUCKET_NAME='faceapi-person'
FACEAPI_STORAGE_SESSION_BUCKET_NAME='faceapi-session'
FACEAPI_STORAGE_ENDPOINT='http://localhost:9000'

Restart the Face Web API service:

sudo systemctl restart face-rec-service.service

Verify Face Web API Service:

sudo systemctl status face-rec-service

Warning

Face Identification is supported only on Debian 11.

PostgreSQL

Refer to the Install PostgreSQL with APT on Debian guide.

Configure PostgreSQL:

# Add user `postgres` to sudo group
sudo adduser postgres sudo

# Switch to the `postgres` user:
sudo su - postgres

# Create a DB user `regula` with an example password 'Regulapasswd#1':
createuser regula -d -P

# Create a DB `regula_db`:
createdb regula_db -O regula

Storage

You can use your existing S3 compatible object storage or install Minio storage.

Milvus

Note

The Milvus package requires the libopenblas-base dependency to be installed.

Download the .deb package that Milvus provides and install Milvus standalone:

wget https://github.com/milvus-io/milvus/releases/download/v2.2.0/milvus_2.2.0-1_amd64.deb
sudo apt-get update
sudo dpkg -i milvus_2.2.0-1_amd64.deb
sudo apt-get -f install

After installation, Milvus standalone and its dependencies (etcd and MinIO) start automatically. You can check their status:

sudo systemctl status milvus
sudo systemctl status milvus-etcd
sudo systemctl status milvus-minio

Download Minio Client (CLI):

wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo cp -ar mc /usr/bin/

Create minio bucket:

mc config host add myminio http://localhost:9000 minioadmin minioadmin;
mc rm -r --force myminio/faceapi-person;
mc rm -r --force myminio/faceapi-session;
mc mb myminio/faceapi-person;
mc mb myminio/faceapi-session;

FaceApi

Edit the .env file located at the /opt/regula/face-rec-service folder - set liveness and identification variables to "true":

FACEAPI_ENABLE_IDENTIFICATION='true'
FACEAPI_LIVENESS_GEN_2='true'

then add the following variables:

FACEAPI_SQL_URL='postgresql://regula:Regulapasswd#1@localhost:5432/regula_db'
AWS_ACCESS_KEY_ID='minioadmin'
AWS_SECRET_ACCESS_KEY='minioadmin'
FACEAPI_STORAGE_PERSON_BUCKET_NAME='faceapi-person'
FACEAPI_STORAGE_SESSION_BUCKET_NAME='faceapi-session'
FACEAPI_STORAGE_ENDPOINT='http://localhost:9000'

Restart the Face Web API service:

sudo systemctl restart face-rec-service.service

Verify Face Web API Service:

sudo systemctl status face-rec-service

Note

To enable Face Search on CentOS 7, make sure to change the SELinux mode to Permissive:

sudo setenforce 0
getenforce

PostgreSQL

Refer to the Install PostgreSQL with YUM on Centos guide.

Configure PostgreSQL:

# Add user `postgres` to wheel group
sudo usermod -aG wheel postgres

# Switch to the `postgres` user
sudo su - postgres

# Create a DB user `regula` with an example password 'Regulapasswd#1':
createuser regula -d -P

# Create a DB `regula_db`
createdb regula_db -O regula

Storage

You can use your existing S3 compatible object storage or install Minio storage.

Milvus

Download the .deb package that Milvus provides and install Milvus standalone.

sudo yum install https://github.com/milvus-io/milvus/releases/download/v2.2.0/milvus-2.2.0-1.el7.x86_64.rpm

Start and check the status of Milvus and its dependencies

sudo systemctl start milvus
sudo systemctl start milvus-etcd
sudo systemctl start milvus-minio
sudo systemctl status milvus
sudo systemctl status milvus-etcd
sudo systemctl status milvus-minio

Download Minio Client (CLI):

wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo cp -ar mc /usr/bin/

Create minio bucket:

mc config host add myminio http://localhost:9000 minioadmin minioadmin;
mc rm -r --force myminio/faceapi-person;
mc rm -r --force myminio/faceapi-session;
mc mb myminio/faceapi-person;
mc mb myminio/faceapi-session;

FaceApi

Edit the .env file located at /opt/regula/face-rec-service folder - set liveness and identification variables to "true":

FACEAPI_ENABLE_IDENTIFICATION='true'
FACEAPI_LIVENESS_GEN_2='true'

then add the following variables:

FACEAPI_SQL_URL='postgresql://regula:Regulapasswd#1@localhost:5432/regula_db'
AWS_ACCESS_KEY_ID='minioadmin'
AWS_SECRET_ACCESS_KEY='minioadmin'
FACEAPI_STORAGE_PERSON_BUCKET_NAME='faceapi-person'
FACEAPI_STORAGE_SESSION_BUCKET_NAME='faceapi-session'
FACEAPI_STORAGE_ENDPOINT='http://localhost:9000'

Restart the Face Web API service:

sudo systemctl restart face-rec-service.service

Verify Face Web API Service:

sudo systemctl status face-rec-service