Skip to content

FaceStream manual launching#

Before manual launching FaceStream, the following actions should be performed:

Command for launching 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 \
--name=luna-streams \
--restart=always \
--detach=true \
--network=host \
dockerhub.visionlabs.ru/luna/luna-streams:v.0.0.3

Commands for launching FaceStream container#

Command for launching 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 /etc/localtime:/etc/localtime:ro \
--env=PORT=34569 \
--detach=true \
--restart=always \
--name=facestream \
--network=host \
dockerhub.visionlabs.ru/luna/facestream:v.5.1.2

For a description of the remaining parameters and launching keys, see the relevant sections below.

Command for launching 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 "GPU dependencies installation" 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 /etc/localtime:/etc/localtime:ro \
--env=PORT=34569 \
--gpus device=0 \
--detach=true \
--restart=always \
--name=facestream \
--network=host \
dockerhub.visionlabs.ru/luna/facestream:v.5.1.2

--gpus device=0 - 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 relevant sections below.

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=127.0.0.1 - 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=5070 - listening port for the Configurator service. By default, port 5070 is used.

  • PORT=34569 - port where FaceStream will listen.

  • STREAMS_ID="" - the parameter specifies a list of "stream_id" that will be requested from LUNA Streams for processing.

If the value is " "\, then no new streams will be received.

If a non-existent value is set, an error about an incorrect UUID will be indicated when launching FaceStream.

If STREAMS_ID is not set, then FaceStream will take all existing "stream_id" from the queue.

By default, the value equals " ".

To use the key, the CONFIGURATOR_HOST and CONFIGURATOR_PORT variables should be specified.

  • CONFIGS_ID="" - is used to set a LUNA Configurator tag, which relates to the FaceStream main configurations. The same tag should be set for "TRACK_ENGINE_CONFIG" and "FACE_STREAM_CONFIG".

If the value is set to " " then the "TRACK_ENGINE_CONFIG" and "FACE_STREAM_CONFIG" records will be used by default. If the record by default does not exist or has an invalid JSON syntax, the configuration file from the distribution package will be used.

By default, the value equals " ".

To use the key, the CONFIGURATOR_HOST and CONFIGURATOR_PORT variables should be specified.

Description of container launch parameters#

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".

--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 port 5440 is the local port, and 5432 is 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.