Introduction#
This document provides an example of the steps required to upgrade to a new FaceStream build, provided that the application was previously launched without LUNA PLATFORM installed (see the document "Installation manual without LP launched"). If FaceStream was launched in accordance with the FaceStream installation manual with the LUNA PLATFORM launched, then the "Upgrade manual" document must be used.
This manual is intended with an assumption that:
- You already have a previous minor version of FaceStream distribution installed and the required environment is up and running at your server(s).
- FaceStream is installed according to FaceStream installation manual without LP launched, and the default paths are used. Otherwise, you should consider your manual changes during the update.
This document includes an example of FaceStream deployment. It implements LUNA PLATFORM minimum power operating for demonstration purposes and cannot be used for the production system.
All the provided commands should be executed using the Bash shell (when you launch commands directly on the server) or in a program for working with network protocols (when you remotely connect to the server), for example, Putty.
Before upgrade#
Make sure you are the root user before starting the upgrade!
Before upgrade FaceStream, you need to do the following:
1โค Create backups. 1โค Delete symbolic link. 1โค Unpack the distribution of the new version of FaceStream. 1โค Create new symbolic link. 1โค Move old data of the PostgreSQL DB. 1โค Move old data of the Influx DB. 1โค Save user configurations of the Configurator service if they have changed. 1โค Set up GPU computing if you plan to use GPU. 1โค Login to VisionLabs registry if authorization was not previously performed. 1โค Update the license if necessary. 1โค Remove old containers. 1โค Launch Influx OSS 2 container. 1โค Setup PostgreSQL 1โค Perform LUNA Configurator DB migration. 1โค Launch LUNA Configurator container. 1โค Launch LUNA Licenses container.
After the steps have been performed, you can start manually or automatically launching LUNA Streams and FaceStream.
Create backups#
It is recommended to create the following backups:
- Backup of LUNA Streams database (not described in this documentation).
- Backup of LUNA PLATFORM services, LUNA Streams service and FaceStream configurations.
Creating backups will enable you to restore in case of any problems during the migration process.
Backup of services configurations#
Custom configurations for LUNA PLATFORM services (all except the Configurator service), LUNA Streams and FaceStream are automatically migrated using the Configurator service migration mechanism. This backup will not be used during the normal installation of FaceStream.
To create a dump-file, use the following options (may be executed from anywhere on your server):
wget -O /var/lib/fs/settings_dump_backup.json 127.0.0.1:5070/1/dump
or
curl 127.0.0.1:5070/1/dump > /var/lib/fs/settings_dump_backup.json
Delete symbolic link#
Delete the symbolic link to the previous minor version directory using the following command:
rm -f /var/lib/fs/fs-current
Unpack distribution#
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_standalone_eng_v.5.2.16.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_standalone_eng_v.5.2.16.zip
Create symbolic link#
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_standalone_eng_v.5.2.16 fs-current
Move data#
Move the data for your databases to the directory with new distribution.
It is considered, that you use the default paths for storing databases and buckets.
The example is provided for updating from version v.5.110.0. You should perform these actions for the FaceStream build installed on your server. Change v.5.110.0 in commands below to your currently installed build.
You should copy the data folder of your database from "facestream_v.5.110.0" directory to the current root. Thus you can use your data in the new FaceStream build.
Move PostgreSQL data#
The following step is required if you are using PostgreSQL in Docker container.
Copy the "data" folder:
cp -r /var/lib/fs/facestream_v.5.110.0/example-docker/postgresql /var/lib/fs/fs-current/example-docker/
Move InfluxDB Data#
The following step is required if you are using InfluxDB in Docker container.
Copy the "influx" folder with all its buckets:
cp -r /var/lib/fs/facestream_docker_v.5.110.0/example-docker/influx /var/lib/fs/fs-current/example-docker/
Save user configurations of the Configurator#
The configurations of the Configurator service are not automatically migrated, unlike the configurations of all other services.
If your previous LP version was used with non-default Configurator service configurations, back up your /var/lib/fs/fs-current/extras/conf/configurator_configs/luna_configurator_postgres.conf config file in the separate directory on your server.
cp /var/lib/fs/fs-current/extras/conf/configurator_configs/luna_configurator_postgres.conf /var/lib/fs/BACKUP_luna_configurator_postgres.conf
This backup must be mounted to the Configurator service container that is being run.
If you are not sure if the Configurator service configurations have changed, you can compare the created backup with the Configurator configurations from the current distribution using the following command:
diff /var/lib/fs/<your_previous_FACESTREAM_TAGsion>/extras/conf/configurator_configs/luna_configurator_postgres.conf /var/lib/fs/BACKUP_luna_configurator_postgres.conf
Install GPU dependencies#
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.
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 nvcr.io/nvidia/cuda:12.4.0-base-ubi8 nvidia-smi
See the NVIDIA documentation for additional information.
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.
Actions to launch FaceStream with GPU through Docker Compose#
To launch FaceStream with GPU through Docker Compose, it is necessary, in addition to the above actions, to add the deploy section in the facestream field to the docker-compose.yml file.
Before starting the FaceStream container with GPU, it is required to enable GPU for calculations in the FaceStream settings using the "enable_gpu_processing" parameter (see the "FaceStream configuration" section in the administrator manual).
vi /var/lib/fs/fs-current/example-docker/docker-compose.yml
facestream:
image: ${REGISTRY_ADDRESS}:${DOCKER_REGISTRY_PORT}/facestream:${FACESTREAM_TAG}
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: always
environment:
CONFIGURATOR_HOST: ${HOST_CONFIGURATOR}
CONFIGURATOR_PORT: 5070
Here:
driverโ Specifies the driver for the reserved device(s).countโ Specifies the number of GPU devices that should be reserved (providing the host holds that number of GPUs).capabilitiesโ Expresses both generic and driver specific capabilities. It must be set, otherwise, an error will be returned when deploying the service.
See the documentation for additional information:
https://docs.docker.com/compose/gpu-support/#enabling-gpu-access-to-service-containers.
Login to registry#
When launching containers, 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.
Login and password can be requested from the VisionLabs representative.
Enter login
docker login dockerhub.visionlabs.ru --username <username>
After running the command, you will be prompted for a password. Enter password.
In the
docker logincommand, you can enter the login and password at the same time, but this does not guarantee security because the password can be seen in the command history.
License activation#
To activate/upgrade a license, follow the steps in the license activation manual included in the distribution package.
Remove old containers#
Before launching the containers of the current minor version, stop all FaceStream related containers of the previous minor version and third-party software containers.
PostgreSQL and InfluxDB containers can also be removed as their versions can be updated in new build.
PostgreSQL and InfluxDB require restarting even if their containers were not changed. This is related to the transfer of their data folders. See "Move data".
To delete a container use the next command:
docker container rm -f [container_name]
where [container_name] is the service docker container name or ID.
For example, to remove the FaceStream, LUNA Streams, LUNA Configurator and LUNA Licenses containers, use the following command:
docker container rm -f facestream luna-streams luna-configurator luna-licenses
To see the containers names or IDs, use the following command:
docker ps -a
It is also recommended to delete old images of the containers to free space. You can use the following command to delete all unused images.
If there is enough space on the server it is recommended to perform this action only after new version of FaceStream is successfully launched.
The command deletes all the unused images, not only the images related to FaceStream.
docker image prune -a -f
Launch InfluxDB OSS 2 container#
InfluxDB 2.0.8-alpine is required to monitor the minimum required LP services (for more information, see the "Monitoring" section in the LUNA PLATFORM administrator manual).
Note! If you already have InfluxDB 2.0.8-alpine installed, skip this step.
Use the following command to launch InfluxDB:
docker run \
-e DOCKER_INFLUXDB_INIT_MODE=setup \
-e DOCKER_INFLUXDB_INIT_BUCKET=default \
-e DOCKER_INFLUXDB_INIT_USERNAME=luna \
-e DOCKER_INFLUXDB_INIT_PASSWORD=password \
-e DOCKER_INFLUXDB_INIT_ORG=luna \
-e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=kofqt4Pfqjn6o0RBtMDQqVoJLgHoxxDUmmhiAZ7JS6VmEnrqZXQhxDhad8AX9tmiJH6CjM7Y1U8p5eSEocGzIA== \
-v /etc/localtime:/etc/localtime:ro \
-v /var/lib/fs/fs-current/example-docker/influx:/var/lib/influxdb2 \
--restart=always \
--detach=true \
--network=host \
--name influxdb \
dockerhub.visionlabs.ru/luna/influxdb:2.0.8-alpine
The command above creates a default bucket. The bucket for storing monitoring data will be created during the environment preparation step using the Storages utility. Note that attempting to prepare an environment (create a bucket) for InfluxDB via the Storages utility will fail if the bucket already exists and the
-iiflag (ignore the entity if it already exists) is not specified in the environment preparation command.
PostgreSQL#
Migrate PostgreSQL 12 to PostgreSQL 16#
In the FaceStream v.5.1.41, the VisionLabs image for PostgreSQL has been updated from version 12 to version 16.
If this image was previously used, then you need to perform the migration yourself according to official documentation. If necessary, you can continue using PostgreSQL 12 by specifying the image "postgis-vlmatch:12" in the container launch command.
Mounting PostgreSQL 12 data from the directory "/var/lib/fs/fs-current/example-docker/postgresql/data/" into a container for PostgreSQL 16 will result in an error.
Launch PostgreSQL container#
Note. Make sure that the old PostgreSQL container is deleted.
Use the following command to launch PostgreSQL.
docker run \
--env=POSTGRES_USER=luna \
--env=POSTGRES_PASSWORD=luna \
--shm-size=1g \
-v /var/lib/fs/fs-current/example-docker/postgresql/data/:/var/lib/postgresql/data/ \
-v /etc/localtime:/etc/localtime:ro \
--name=postgres \
--restart=always \
--detach=true \
--network=host \
dockerhub.visionlabs.ru/luna/postgis-vlmatch:16.1
Here:
-v /var/lib/luna/current/example-docker/postgresql/data/:/var/lib/postgresql/data/โ The volume command enables you to mount the "data" folder to the PostgreSQL container. The folder on the server and the folder in the container will be synchronized. The PostgreSQL data from the container will be saved to this directory.--network=hostโ If you need to change the port for PostgreSQL, you should change this string to-p 5440:5432. Where the first port5440is the local port and5432is the port used inside the container.
Update environment#
To update the LUNA Configurator service, you need to migrate the database to PostgreSQL.
The migration is performed using the Storages utility.
Setting Storages configuration file#
Note: Skip this section if you are updating the LUNA Configurator service in the default setup on a host with both Postgres and InfluxDB. If the LUNA Configurator service is deployed in a different environment, follow the steps below to inform the Storages utility of the actual databases location.
During the environment update, the configuration file for the Storages utility is used, which contains:
- Connection settings for the LUNA Configurator database.
- Connection settings for the InfluxDB database for creating monitoring buckets.
This file must be mounted into the Storages container and passed as an argument to --config.
As an example, the storages_config.conf file is mounted, containing default settings for minimal basic service deployment.
Edit the Storages configuration file to set custom settings:
vi /var/lib/fs/fs-current/extras/conf/configs/storages_config.conf
Update environment for Configurator#
Update the environment for the LUNA Configurator service using the Storages utility.
docker run \
--rm \
--network=host \
-v /var/lib/fs/fs-current/extras/conf/configs/storages_config.conf:/srv/storages_config.conf \
dockerhub.visionlabs.ru/luna/storages:v.0.49.0 \
bash -c "luna_prepare prepare configurator \
--entity=all_entities \
--platform_version=v.5.115.0 \
--config=/srv/storages_config.conf"
This command will perform the database migration for the LUNA Configurator service using the PostgreSQL database access settings specified in the Storages configuration.
Launch LUNA Configurator container#
Use the following command to launch Configurator:
docker run \
--env=PORT=5070 \
--env=WORKER_COUNT=1 \
--env=RELOAD_CONFIG=1 \
--env=RELOAD_CONFIG_INTERVAL=10 \
-v /etc/localtime:/etc/localtime:ro \
-v /var/lib/fs/fs-current/extras/conf/configurator_configs/luna_configurator_postgres.conf:/srv/luna_configurator/configs/config.conf \
-v /tmp/logs/configurator:/srv/logs \
--name=luna-configurator \
--restart=always \
--detach=true \
--network=host \
dockerhub.visionlabs.ru/luna/luna-configurator:v.2.4.11
LUNA Licenses service#
Specify license settings using Configurator#
Follow the steps below to set the settings for HASP-key or Guardant-key.
Specify HASP license settings#
Note. Perform these actions only if the HASP key is used. See the "Specify Guardant license settings" section if the Guardant key is used.
To set the license server address, follow these steps:
-
Go to the Configurator service interface
http://<configurator_server_ip>:5070/. -
Specify the "LICENSE_VENDOR" value in the "Setting name" field and click "Apply Filters".
-
Set the IP address of the server with your HASP key in the field "server_address".
-
Click "Save".
If the license is activated using the HASP key, then two parameters "vendor" and "server_address" must be specified. If you want to change the HASP protection to Guardant, then you need to add the "license_id" field.
Specify Guardant license settings#
Note. Perform these actions only if the Guardant key is used. See the "Specify HASP license settings" section if the HASP key is used.
To set the license server address, follow these steps:
-
Go to the Configurator service interface
http://<configurator_server_ip>:5070/. -
Enter the value "LICENSE_VENDOR" in the "Setting name" field and click "Apply Filters".
-
Set the IP address of the server with your Guardant key in the "server_address" field.
-
Set the license ID in the format
0x<your_license_id>, obtained in the section "Save license ID" in the license activation manual, in the "license_id" field. -
Click "Save".
If the license is activated using the Guardant key, then three parameters "vendor", "server_address" and "license_id" must be specified. If you want to change the Guardant protection to HASP, then you need to delete the "license_id" field.
Launch LUNA Licenses container#
Use the following command to launch the service:
docker run \
--env=CONFIGURATOR_HOST=127.0.0.1 \
--env=CONFIGURATOR_PORT=5070 \
--env=PORT=5120 \
--env=WORKER_COUNT=1 \
--env=RELOAD_CONFIG=1 \
--env=RELOAD_CONFIG_INTERVAL=10 \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/logs/licenses:/srv/logs \
--name=luna-licenses \
--restart=always \
--detach=true \
--network=host \
dockerhub.visionlabs.ru/luna/luna-licenses:v.0.15.15
Upgrade FaceStream#
Before launching FaceStream, the steps described in the "Before upgrade" section must be completed.
Migrate settings#
To preserve the possibility of using the LUNA Streams user settings from the previous version, you should perform a migration. In the current release, you need to migrate twice โ to version 0.5.17, and then to version v.1.2.1.
If you are upgrading from FaceStream v.5.1.18 and below, you must first run the following command for LUNA Streams v.0.5.17, and then for the latest version of LUNA Streams.
FaceStream settings do not require migration in the current release.
docker run \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/logs/streams:/srv/logs \
--entrypoint=/bin/bash \
--rm \
--network=host \
dockerhub.visionlabs.ru/luna/streams-configs:v.1.2.1 \
-c "python3 -m streams_configs.migrate head --config_db_url postgres://luna:luna@127.0.0.1:5432/luna_configurator"
Here:
python3 -m streams_configs.migrateโ Migration script.--config_db_url postgres://luna:luna@127.0.0.1:5432/luna_configuratorโ The "luna_configurator" database address flag.
Migrate LUNA Streams database#
Run migration script to update the LUNA Streams database structure.
It is recommended that you back up your database before taking any changes.
docker run \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/logs/streams:/srv/logs \
--rm \
--network=host \
dockerhub.visionlabs.ru/luna/luna-streams:v.1.2.1 \
alembic -x luna-config=http://127.0.0.1:5070/1 upgrade head
Launch LUNA Streams container#
The container is launched with the following command:
docker run \
--env=CONFIGURATOR_HOST=127.0.0.1 \
--env=CONFIGURATOR_PORT=5070 \
--env=PORT=5160 \
--env=WORKER_COUNT=1 \
--env=RELOAD_CONFIG=1 \
--env=RELOAD_CONFIG_INTERVAL=10 \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/logs/streams:/srv/logs \
--name=luna-streams \
--restart=always \
--detach=true \
--network=host \
dockerhub.visionlabs.ru/luna/luna-streams:v.1.2.1
To check if the service started correctly, you can perform a GET request http://127.0.0.1:5160/version. The response should return the LUNA Streams version v.1.2.1.
Launch FaceStream container#
The following launch commands use the mount parameters of the faceengine.conf, runtime.conf and trackengine.conf configuration files:
-v /var/lib/fs/fs-current/extras/conf/configs/faceengine.conf:/srv/facestream/data/faceengine.conf \โ this parameter allows you to use FaceEngine settings from the "faceengine.conf" configuration file.-v /var/lib/fs/fs-current/extras/conf/configs/runtime.conf:/srv/facestream/data/runtime.conf \โ this parameter allows you to use runtime settings from the "runtime.conf" configuration file.-v /var/lib/fs/fs-current/extras/conf/configs/trackengine.conf:/srv/facestream/data/trackengine.conf \โ this parameter allows you to use TrackEngine settings from the "trackengine.conf" configuration file.
Important! Parameters can be specified either via the Configurator service (see the "Settings in LUNA Configurator service" section of the administrator's guide) or in configuration files simultaneously. If the parameters match, the value specified in the Configurator service takes precedence.
The Configurator service allows you to configure only basic user settings. For more detailed settings, you should use a configuration file.
Launch FaceStream container using CPU#
The container is launched as follows:
docker run \
--env=CONFIGURATOR_HOST=127.0.0.1 \
--env=CONFIGURATOR_PORT=5070 \
-v /var/lib/fs/fs-current/extras/conf/configs/faceengine.conf:/srv/facestream/data/faceengine.conf \
-v /var/lib/fs/fs-current/extras/conf/configs/runtime.conf:/srv/facestream/data/runtime.conf \
-v /var/lib/fs/fs-current/extras/conf/configs/trackengine.conf:/srv/facestream/data/trackengine.conf \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/logs/facestream:/srv/logs \
--env=PORT=34569 \
--detach=true \
--restart=always \
--name=facestream \
--network=host \
dockerhub.visionlabs.ru/luna/facestream:v.5.2.16
For a description of the remaining parameters and launching keys, see the "Launching keys" section.
To verify that the application was launched correctly, you can perform a GET request http://127.0.0.1:34569/version. The response should return the FaceStream v.5.2.16.
Launch FaceStream container using GPU#
Note. Use this command only if you are going to use FaceStream with GPU.
Before launching FaceStream in GPU mode, additional dependencies should be installed (see "Install GPU dependencies" section).
Before starting the FaceStream container with GPU, it is required to enable GPU for calculations in the FaceStream settings using the "enable_gpu_processing" parameter (see the "FaceStream configuration" section in the administrator manual).
docker run \
--env=CONFIGURATOR_HOST=127.0.0.1 \
--env=CONFIGURATOR_PORT=5070 \
-v /var/lib/fs/fs-current/extras/conf/configs/faceengine.conf:/srv/facestream/data/faceengine.conf \
-v /var/lib/fs/fs-current/extras/conf/configs/runtime.conf:/srv/facestream/data/runtime.conf \
-v /var/lib/fs/fs-current/extras/conf/configs/trackengine.conf:/srv/facestream/data/trackengine.conf \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/logs/facestream:/srv/logs \
--env=PORT=34569 \
--gpus device=0 \
--detach=true \
--restart=always \
--name=facestream \
--network=host \
dockerhub.visionlabs.ru/luna/facestream:v.5.2.16
Here --gpus device=0 is the parameter specifies the used GPU device and enables GPU utilization. A single GPU can be utilized per FaceStream instance. Multiple GPU utilization per instance is not available.
For a description of the remaining parameters and launching keys, see the "Launching keys" section.
To verify that the application was launched correctly, you can perform a GET request http://127.0.0.1:34569/version. The response should return the FaceStream v.5.2.16.
Additional information#
This section provides the following additional information:
- Useful commands for working with Docker.
- Launching keys description.
- Configuring Docker log rotation.
Docker commands#
Show containers#
To show the list of launched Docker containers use the command:
docker ps
To show all the existing Docker containers use the command:
docker ps -a
Copy files to container#
You can transfer files into the container. Use the docker cp command to copy a file into the container.
docker cp <file_location> <container_name>:<folder_inside_container>
Enter container#
You can enter individual containers using the following command:
docker exec -it <container_name> bash
To exit the container, use the command:
exit
Images names#
You can see all the names of the images using the command:
docker images
Show container logs#
You can view the container logs with the following command:
docker logs <container_name>
Delete image#
If you need to delete an image:
- Run the
docker imagescommand. - Find the required image, for example: dockerhub.visionlabs.ru/luna/v.5.2.16.
- Copy the corresponding image ID from the IMAGE ID, for example, \"61860d036d8c\".
- Specify it in the deletion command:
docker rmi -f 61860d036d8c
Delete all the existing images:
docker rmi -f $(docker images -q)
Stop container#
You can stop the container using the command:
docker stop <container_name>
Stop all the containers:
docker stop $(docker ps -a -q)
Delete container#
If you need to delete a container:
- Run the
docker pscommand. - Stop the container (see Stop container).
- Find the required image, for example: dockerhub.visionlabs.ru/luna/v.5.2.16.
- Copy the corresponding container ID from the CONTAINER ID column, for example, "23f555be8f3a".
- Specify it in the deletion command:
docker container rm -f 23f555be8f3a
Delete all the containers:
docker container rm -f $(docker container ls -aq)
Launching keys#
To launch FaceStream with Configurator, the keys are set using environment variables:
-
--env=โ this parameter sets the environment variables required to start the container. The following basic values are specified:CONFIGURATOR_HOSTโ Host on which the Configurator service is running. The local host is set if the container is running on the same server where the Configurator is running.CONFIGURATOR_PORTโ Listening port for the Configurator service. By default, port 5070 is used.PORTโ Port where FaceStream will listen.-
STREAMS_IDโ Tag specifies a list of stream IDs that will be requested from LUNA Streams for processing. Other streams will be filtered. The "stream_id" parameter is given in response to the "create stream" request.If the value is " " or the "STREAMS_ID" tag is not set, then FaceStream will take all existing "stream_id" from the queue.
If a non-existent value is set, an error about an incorrect UUID will be indicated when launching FaceStream.
By default, the value equals " ".
To use the key, the "CONFIGURATOR_HOST" and "CONFIGURATOR_PORT" variables should be specified.
-
STREAMS_NAMEโ List of streams names sets in this tag. Streams names are set using the "name" parameter at the time of their creation ("create streams" request). Streams with these names will be requested from LUNA Streams for processing. Other streams will be filtered.Otherwise, the principle of operation is similar to the "STREAMS_ID" tag.
-
GROUPS_IDandGROUPS_NAMEโ Tags specify a list of group IDs or a list of group names. The parameters "group_id" or "group_name" are set during stream creation ("create stream" request). Streams with these parameters will be requested from LUNA Streams for processing. Other streams will be filtered.If the value is " " or the "GROUPS_ID"/"GROUPS_NAME" tags are not set, then FaceStream will not filter streams by groups.
If a non-existent value is set, an error about an incorrect UUID will be indicated when launching FaceStream.
By default, the value equals " ".
To use the keys, the "CONFIGURATOR_HOST" and "CONFIGURATOR_PORT" variables should be specified.
You can set multiple values for "STREAMS_NAME", "STREAMS_ID", "GROUPS_NAME" and "GROUPS_ID" tags. Syntax example:
--env=STREAMS_ID="037f3196-c874-4eca-9d7c-91fd8dfc9593 4caf7cf7-dd0d-4ad5-a35e-b263e742e28a" -
FACE_STREAM_CONFIG_TAGโ Tag for settings from the "FACE_STREAM_CONFIG" section of the LUNA Configurator service. -
TRACK_ENGINE_CONFIG_TAGโ Tag for settings from the "TRACK_ENGINE_CONFIG" section of the LUNA Configurator service. -
FACEENGINE_CONFIG_TAGโ Tag for settings from the "FACEENGINE_CONFIG" section of the LUNA Configurator service. -
RUNTIME_CONFIG_TAGโ Tag for settings from the "RUNTIME_CONFIG" section of the LUNA Configurator service. -
CONFIG_RELOAD = 1โ Tag that enables checking for changes in the "FACE_STREAM_CONFIG" section of the LUNA Configurator service and takes the following values: โ "1" โ Change tracking is enabled, if there are changes in the configuration, all FaceStream containers will be automatically restarted. โ "0" โ Change tracking is disabled.By default, the value equals "1".
-
PULLING_TIME = 10โ Tag that sets the period for receiving new parameters from the "FACE_STREAM_CONFIG" section of the LUNA Configurator service in the range [1...3600] sec. Used in conjunction with theCONFIG-RELOADtag.By default, the value equals "10".
-
--device=โ This parameter is required to specify the address to the USB device. The address must be specified in the stream source when it is created. Example:--device=/dev/video0.
See how FaceStream works with LUNA Configurator in the section "Use FaceStream with LUNA Configurator" of the administrator manual.
Description of container launch parameters#
Below is a description of the container launch commands:
docker runโ Command to launch the selected image as a new container.-vโ Enables you to load the contents of the server folder into the volume of the container. This way the content is synchronized.-v /var/lib/fs/fs-current/extras/conf/configs/faceengine.conf:/srv/facestream/data/faceengine.conf \โ This parameter enables you to use the FaceEngine settings from the configuration file "faceengine.conf".-v /var/lib/fs/fs-current/extras/conf/configs/runtime.conf:/srv/facestream/data/runtime.conf \โ This parameter enables you to mount the runtime configuration file into the FaceStream container. Before changing the default settings, you need to consult with VisionLabs specialists.--network=hostโ This parameter specifies that there is no network simulation and a server network is used. If you need to change the port for third-party containers, replace this line with-p 5440:5432. Here, the first port5440is the local port, and5432is the port used in the container./etc/localtime:/etc/localtime:roโ Sets the current time zone used by the container system.--name=facestreamโ This parameter specifies the name of the container to be launched. The name must be unique. If a container with the same name already exists, an error will occur.--restart=alwaysโ This parameter defines the restart policy. Daemon always restarts the container regardless of the completion code.--detach=trueโ Running the container in the background.
Docker log rotation#
To limit the size of logs generated by Docker, you can set up automatic log rotation. To do this, add the following data to the /etc/docker/daemon.json file:
{
"log-driver": "json-file",
"log-opts": {
"max-size": "100m",
"max-file": "5"
}
}
This will allow Docker to store up to 5 log files per container, with each file being limited to 100MB.
After changing the file, you need to restart Docker:
systemctl reload docker
The above changes are the default for any newly created container, they do not apply to already created containers.