Skip to content

Before launching#

Unpacking#

It is recommended to move the archive to a pre-created directory for FaceStream and unpack the archive there.

The following commands should be performed under the root user.

Create a directory for FaceStream.

mkdir -p /var/lib/fs

Move the archive to the created directory. It is considered that the archive is saved to the "/root" directory.

mv /root/facestream_docker_v.5.0.7.zip /var/lib/fs/

Go to the directory.

cd /var/lib/fs/

Install the unzip utility if it is not installed.

yum install unzip

Unpack the archive.

unzip facestream_docker_v.5.0.7.zip

You will need to configure FaceStream before launching it.

The unpacked archive includes all the configuration files required for the FaceStream launch. The configuration parameters description is given further in this document.

Create a symbolic link. The link indicates that the current version of the distribution file is used to run the software package.

ln -s facestream_docker_v.5.0.7 fs-current

Create logs directory#

You should create a directory to save FaceStream logs on the server before starting FaceStream.

mkdir -p /var/lib/fs/fs-current/logs/

Docker installation#

Docker is required for launching of the FaceStream container.

The Docker installation is described in the official documentation:

https://docs.docker.com/engine/install/centos/.

You do not need to install Docker if you already have an installed Docker of the latest version on your server.

Quick installation commands are listed below.

Check the official documentation for updates if you have any problems with the installation.

Install dependencies.

yum install -y yum-utils device-mapper-persistent-data lvm2

Add repository.

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Install Docker.

yum -y install docker-ce docker-ce-cli containerd.io

Launch Docker.

systemctl start docker
systemctl enable docker

Check Docker status.

systemctl status docker

GPU dependencies installation#

Skip this section if you are not going to utilize GPU for your calculations.

You need to install NVIDIA Container Toolkit to use GPU with Docker containers.

CUDA of version 11.2.1 is already installed in the Docker container of FaceStream.

The example of the installation is given below.

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | tee /etc/yum.repos.d/nvidia-docker.repo
yum install -y nvidia-container-toolkit
systemctl restart docker

Check the NVIDIA Container toolkit operating by running a base CUDA container (this container is not provided in the FaceStream distribution and should be downloaded from the Internet):

docker run --rm --gpus all nvidia/cuda:11.2.1-base nvidia-smi

See the documentation for additional information:

https://github.com/NVIDIA/nvidia-docker#centos-7x8x-docker-ce-rhel-7x8x-docker-ce-amazon-linux-12.

Attributes extraction on the GPU is engineered for maximum throughput. The input images are processed in batches. This reduces computation cost per image but does not provide the shortest latency per image.

GPU acceleration is designed for high load applications where request counts per second consistently reach thousands. It won’t be beneficial to use GPU acceleration in non-extensively loaded scenarios where latency matters.

Login to registry#

When launching container, you should specify a link to the image required for the container launching. This image will be downloaded from the VisionLabs registry. Before that, you should login to the registry.

Enter login and password . They are received from VisionLabs.

License activation#

This section describes license activation.

License activation should be performed after the FaceStream distribution package is unarchived. You should change the configuration file "license.conf" in the unpacked FaceStream package, which is indicated by the symbolic link "fs-current".

The generated license can only be used on the device where it was activated.

Always remember that incorrect config may huck the things up very badly. Pay attention to what you configure and how. Always double-check what you deploy.

Online activation#

Online activation is performed when you have an Internet connection on the device where the FaceStream license is activated.

Licensing configuration options are specified via the "license.conf" file which is an XML document with special tag formatting.

You can find the "license.conf" file in the "license" directory in the distribution package.

This file is mandatory for license activation. You must fill it with the correct values before launching FaceStream.

Incorrectly entered data may cause problems with activation on the device.

Online activation process#

The activation process is as follows:

  • Request the Server, EID, and ProductID from VisionLabs
  • Open the "license.conf" file
  • Enter the received parameters
  • Save changes in the "license.conf" file

To add the configuration file to the container, use the following command:

-v /var/lib/fs/fs-current/license/license.conf:/srv/facestream/data/license.conf \

The required configuration file will be added to the FaceStream container when it is launched. See the description of the launch in the "Launching FaceStream" section.

After the license activation, a new file will be created. The filename will be specified according to the value of "Filename" parameter in license.conf.

Offline activation#

Offline activation is performed when you do not have an Internet connection on the device where the FaceStream license is activated.

In this case, you should create a fingerprint of your device and use it to receive a license key on any other device with the Internet.

Offline activation process#

The activation process is as follows:

  • Request the website address for license key activation, ProductID and EID from VisionLabs.

Perform the following steps on the device where the license should be activated:

  • Go to the "license" directory of distribution;

  • Open the "license.conf" file;

  • Enter the received EID and ProductID;

  • Specify "http://localhost" in the "Server" field;

  • Save changes in the "license.conf" file;

  • Run the "FingerprintViewer" utility to create a fingerprint of your device:

docker run \ --rm \ --network=host \ -w /srv/facestream \ -v /var/lib/fs/fs-current/license/license.conf:/srv/facestream/data/license.conf \ --entrypoint /srv/facestream/FingerprintViewer \ dockerhub.visionlabs.ru/luna/facestream:v.5.0.7

  • The fingerprint will be printed in the console. Copy and save it.

Perform the following steps on the device with the Internet:

  • Go to the website to receive license (the website address was received on the first step of this instruction);

  • Enter your EID to enter the website, and using your device fingerprint activate a license;

  • Download license certificate. Please pay attention, by default filename is "licenseFile.v2c". You should rename the received file to "licenseFile.v2c" if it has any other name. The name is set by default in "license.conf".

Perform the following step on the device where the license should be activated:

  • Move the received license key "licenseFile.v2c" to the "license" directory of FaceStream distribution. It should be located next to the "license.conf" file.

To add the configuration file to the container, use the following commands:

-v /var/lib/fs/fs-current/license/license.conf:/srv/facestream/data/license.conf \
-v /var/lib/fs/fs-current/license/licenseFile.v2c:/srv/facestream/data/licenseFile.v2c \

The required configuration files will be added to the FaceStream container when it is launched. See the description of the launch in the "Launching FaceStream" section.

License file parameters description#

License activation and next processing requires parameters listed below.

Parameter Description Type Default value
Server Activation server URL "Value::String" (empty)
EID Entitlement ID "Value::String" (empty)
ProductID Product ID "Value::String" (empty)
Filename Default license filename "Value::String" "licenseFile.v2c"
ContainerMode Technical parameter "Value::String" 0
ConnectionTimeout Request timeout (in seconds) "Value::Int1" 120

Server, EID, and ProductID - this information must be requested from VisionLabs and written to the file. It is mandatory for activation procedure.

You should specify "http://localhost" for the Server parameter during offline activation.

Filename - the name of the file to save license after activation. The maximum length of the setting string is 64 symbols. Do not change this name!

ConnectionTimeout sets the maximum time in seconds during which you can connect to the licensing service. With this parameter, you can adjust the maximum waiting time according to different working conditions, because the operation of resolving the server name and connecting to it can take a significant amount of time, which depends on the specific network. Timeout 0 (zero) means there are no restrictions on the time to connect to the licensing service. The ConnectionTimeout can't be set to a negative value or a value that is large than maximal, which is 300 seconds.

ContainerMode is a technical parameter. Do not change it without consultation with VisionLabs.

An example of the "license.conf" file:

<section name="Licensing::Settings">
    <param name="Server" type="Value::String" text=""/>
    <param name="EID" type="Value::String" text=""/>
    <param name="ProductID" type="Value::String" text=""/>
    <param name="Filename" type="Value::String" text="licenseFile.v2c"/>
    <param name="ContainerMode" type="Value::Int1" x="0"/>
    <param name="ConnectionTimeout" type="Value::Int1" x="120"/>
</section>
Back to top