Skip to content

Platform launch#

When the script is run, a default account of type user will be created with login user@mail.com and password password. See detailed information about accounts in the "Accounts, tokens and authorization types" section of the administrator manual.

Configure User Interface 4 container#

You should configure the BP4_EXTERNAL_IP: field in the "/var/lib/luna/current/example-docker/.env" file before launching the Compose script if you are going to use the User Interface 4 service with the Backport 4 service.

BP4_EXTERNAL_IP=<Backport_4_external_IP>

You should specify the external IP of the server with Backport 4. Otherwise, the User Interface 4 will be unable to send requests to the Backport 4 service.

As a default account for working in User Interface 4, an automatically created account of the user type will be used. In the "/var/lib/luna/current/example-docker/docker-compose.yml" file, the BASIC_AUTH field is already set to dXNlckBtYWlsLmNvbTpwYXNzd29yZA== (login:password in Base64 format).

Launch services#

Go to the Docker Compose folder:

cd /var/lib/luna/current/example-docker

Make sure that LP containers are not launched before executing the script. An error will occur if you try to run a container with the same name as an existing container. If one or several LP containers are launched, you should stop them using the docker container rm -f <container_name> command. To stop all the containers, use docker container rm -f $(docker container ls -aq).

Launch Docker Compose:

You must be logged in the VisionLabs registry (see section "Login to registry")

./start_platform.sh

Deploying containers takes some time. You have to wait until all the services are running before working with Luna Platform.

Check the state of launched Docker containers.

docker ps

Run Handlers utilizing GPU#

The Handlers service does not utilize GPU by default. If you are going to use the GPU, then you should enable its use for the Handlers service in the Configurator service.

If you need to use the GPU for all estimators and detectors at once, then you need to use the global_device_class parameter in the "LUNA_HANDLERS_RUNTIME_SETTINGS" section. All estimators and detectors will use the value of this parameter if the device_class parameter of their settings like "LUNA_HANDLERS__SETTINGS.runtime_settings" is set to global (by default for all estimators and detectors).

If you need to use the GPU for a specific estimator or detector, then you need to use the device_class parameter in sections like "LUNA_HANDLERS__SETTINGS.runtime_settings".

See section "Calculations using GPU" for additional requirements for GPU utilization.

Enable logging to server directory#

LP does not save logs to your server by default. To enable logs saving to the server you should:

  • create a directory for logs (see Create logs directory)
  • enable logs saving and change logs directory in the Configurator service

Set the "log_to_file" parameter to "True" to enable logging to files.

When logging to file is enabled and configured, service logs are written to the "/srv/logs" directory in the service container and to the specified service directory on the server (e. g., "/tmp/logs").

For more information about the LUNA PLATFORM logging system, see the "Logging" section in the administrator manual.

Change logs directory manually#

Specify "folder_with_logs" parameter value to "/srv/logs" for all the services where you want to write logs. The docker run commands are already configured for saving logs to your server to this directory. After launching the service container, the service will write logs to the "/srv/logs"directory.

Set the "log_to_file" parameter to "True" to enable logging to files.

Change logs directory using dump file#

The dump file includes settings for logging to the specified directory.

Copy the dump file provided in the distribution package to the Configurator container.

docker cp /var/lib/luna/current/extras/conf/logging.json luna-configurator:/srv/luna_configurator/used_dumps/logging.json

Update logging setting using the copied file.

docker exec -it luna-configurator python3 ./base_scripts/db_create.py --dump-file /srv/luna_configurator/used_dumps/logging.json