Use FaceStream with configuration files#
If necessary, you can launch FaceStream independently of the "FACE_STREAM_CONFIG" and "TRACK_ENGINE_CONFIG" settings of the LUNA Configurator service using the settings from the configuration files.
With this launch option, it is assumed that the dependent LUNA PLATFORM services will also be launched with configuration files. The description of launching LUNA PLATFORM services with configuration files is not given in this documentation.
FaceStream can be launched with settings from configuration files using the following configuration files:
- fs3Config.conf (settings are similar to "FACE_STREAM_CONFIG" section in LUNA Configurator)
- trackengine.conf (settings are similar to "TRACK_ENGINE_CONFIG" section in LUNA Configurator)
- faceengine.conf
You should first set all the necessary parameters in these files before launching FaceStream.
The command for manually launching a container using configuration files will differ from the command for launching with Configurator and will look as follows:
docker run \
-v /var/lib/fs/fs-current/extras/conf/configs/fs3Config.conf:/srv/facestream/data/fs3Config.conf \
-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/trackengine.conf:/srv/facestream/data/trackengine.conf \
-v /etc/localtime:/etc/localtime:ro \
--restart=always \
--detach=true \
--name=facestream \
--network=host \
--env=PORT=34569 \
--entrypoint /srv/facestream/FaceStream \
dockerhub.visionlabs.ru/luna/facestream:v.5.1.14 \
--config-path /srv/facestream/data/fs3Config.conf \
--data-dir /srv/facestream/data \
--log-dir /srv/facestream/logs \
--http-address http://0.0.0.0:34569
The configuration files are included in the FaceStream package in the "conf/config/" directory and are added to the container at launch with the following commands:
-v /var/lib/fs/fs-current/extras/conf/configs/fs3Config.conf:/srv/facestream/data/fs3Config.conf \
-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/trackengine.conf:/srv/facestream/data/trackengine.conf \
Launching keys for server mode with configuration files#
To launch FaceStream in server mode with configuration files inside the container, the following command is used, which enables you to specify the correct paths to directories inside the container.
--config-path /srv/facestream/data/fs3Config.conf \
--data-dir /srv/facestream/data \
--log-dir /srv/facestream/logs \
--streams-id 426542d6-5509-4e5b-8a01-e2abd5c0a8c6 ee4c42b6-23ae-410e-a2aa-a4220e64ba4b
--groups-name stream_group-1 stream_group-2
--config-reload 1
--pulling-time 1800
--http-address http://0.0.0.0:34569
The following keys are available:
-
--help
- gives a list of available keys and their description. -
--config-path
– full path to the configuration file "fs3Config.conf" of the application. If this parameter is defined, the path to data is ignored when searching for the configuration file. -
--data-dir
– path to the directory with detectors and settings data. -
--log-dir
– directory to record logging files. -
--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 --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.
--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-id
and--groups-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 --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.
-
--config-reload
- tag that enables checking for changes in the "fs3Config.conf" file 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
- tag that sets the period for receiving new parameters from the "fs3Config.conf" file in the range [1...3600] sec. Used in conjunction with theCONFIG-RELOAD
tag.
By default, the value equals 10
.
--http-address
- HTTP address that FaceStream will listen to. It is set in the format "address:port" (used only for FaceStream in server mode). The user will send requests to this address.
You should set the external IP of the FaceStream server. By default, it is set to «http://0.0.0.0:34569».