Skip to content

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.

FaceStream settings do not require migration in the current release.

Run the following command to migrate LUNA Streams settings:

docker run \
-v /etc/localtime:/etc/localtime:ro \
-v /tmp/logs/streams:/srv/logs \
--rm \
--entrypoint='' \
--network=host \
dockerhub.visionlabs.ru/lunastreams-configs:v.0.5.17 \
python3 -m streams_configs.migrate head --config_db_url postgres://luna:luna@127.0.0.1:5432/luna_configurator

--config_db_url postgres://luna:luna@127.0.0.1:5432/luna_configurator - 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/lunaluna-streams:v.0.5.17 \
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/lunaluna-streams:v.0.5.17

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

Launch FaceStream container#

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 /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/lunafacestream:v.5.1.18

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 {}.

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 /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/lunafacestream:v.5.1.18

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