Skip to content

Onpremise Installation

Introduction

das-Face is a software service provided by Veridas which performs face biometry operations. This service exposes a REST API that can be used to call all of its functions and it is released as a configurable Docker solution which can be deployed easily by using docker commands.

Hardware and performance

Requirement Minimum configuration (for 1 worker)
Operative System Ubuntu 18 or Ubunutu 20 or Red Hat 8.X
Processor Intel Xeon Scalable processors
Number of cores 2 cores or vCPUs
Minimum clock frequency 2GHz
RAM Memory (OS Only) 2Gb
RAM Memory service usage 8.5Gb
Total Virtual Memory 19Gb

For N workers, the number of cores and the RAM Memory service usage will be multiplied by N.

Please, note that having 10.5GB of physical memory and covering the reminder up to 15GB of virtual memory using Swap Memory will not harm the performance of the system.

The approximate processing times of the service are available in section API Latency. Using GPU instances speeds up each service by 2 times.

Docker Container configuration

The containerization procedure is configured through environmental variables provided in the docker run command. The default value of these variables are given after the equals symbol. For the current release, these are the variables that can be configured:

  • WORKERS=4 Sets the number of worker processes forked from the master.
  • DEBUG="NO" It may be YES or NO, please, never use YES on production environments.
  • LOG_FORMAT="console-simple"Configures the way logging lines will be structured before written to the corresponding handler. It accepts the values plain, console-simple, console, json.
  • LOG_LEVEL="INFO" Default logging level, it can be CRITICAL, ERROR, WARNING, INFO, DEBUG.
  • LOG_HANDLER="stdout" Indicates where logging lines will be displayed. It can bestdout and file. When stdout is used, the following log variables will be ignored.
  • LOG_FOLDER="/tmp" The folder where log file will be created.
  • LOG_FILENAME="dasface.log" The name of the log file where logging lines will be written, when LOG_HANDLER=file.
  • ACTIVITY_ID_HTTP_HEADER="X-Request-Id" Indicates a header which may be used to trace requests coming from another system. This header may be logged using JSON format.
  • DASFACE_NUM_THREADS_PER_WORKER=2 Indicates the number of dasface threads that can be executed per worker. Please, note that DASFACE_NUM_THREADS_PER_WORKERxWORKERS must be always less or equal to the number of cores (or vCPUs) in the machine.
  • USAGE_TRACKER_API_KEY API KEY credentials provided by veridas for client authentication.
  • PORT=8810 The port we want to expose, by default, port 8810.
  • DASFACE_CONFIG_PATH=/path/to/config.yaml A yaml file for customizing the verification models and server endpoints required at runtime. More information can be found in the Suggested configurations section.

This image exposes the port 8810, which can be bound to any local port in the physical machine. Also, the CAP_SYS_CHROOT capability needs to be passed when running the docker. An example can be found in the following section.

Docker Container creation

The following command is an example of how to create and start a container from the given docker image:

1
2
3
4
5
6
docker run --name dasface \
--cap-add=CAP_SYS_CHROOT \
-e WORKERS=2 \
-e LOG_LEVEL=WARNING \
--rm -t - i -p 8810:8810 \
registry.gitlab.com/dasgroup/veridas/face-team/products/dasface:3.X.X-onpremises-cpu