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.2 \
--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 \
--http-address http://0.0.0.0:34569
The following keys are available:
-
--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. -
--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».