Onpremise Installation¶
Hardware and performance¶
The minimum requirements for production purposes on Amazon AWS are:
- Minimum recommended instance type: c5.large
- Processing times are approximately 1:5 seconds for face comparison when using the end-point documented at section
POST /dasface/v2/verification/photo
. - This numbers are with two images between 800Kb and 2Mb and without concurrent requests.
- Processing times are approximately 1:5 seconds for face comparison when using the end-point documented at section
- Recommended configuration for the instance:
- CPU 2048 MHz
- RAM 3072 Mb +500 Mb reserved for system services
- No more than 2 workers per instance
- Recommended configuration for a machine with M cores:
- Number of workers (W): W = M/2
- RAM: 1024MbW + 500 Mb reserved for system services
- It has been observed that for concurrent requests it is better to have N instances deployed on a larger machine (e.g., c5.2xLarge) than same N instances in N smaller machines (e.g., c5.Large).
- Using a GPU instances may speed-up each service by 2 times.
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 |
|
Container configuration¶
The container creation procedure is configured by using environmental variables which can be given on the docker run command. The default value of this variables is given after equals symbol. For current version, 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=4
Indicates the number of dasface threads that can be executed per worker.
This image exposes the port 8810, which can be bound to any local port in the physical machine.