Skip to content

Before launch#

Make sure that you are the root user before launch!

Before launching the LUNA PLATFORM, you must perform the following actions:

  1. Unpack the LUNA PLATFORM distribution.
  2. Create symbolic link.
  3. Configure SELinux and Firewall.
  4. Activate license.
  5. Install Docker.
  6. Install Docker Compose.
  7. Choose logging method.
  8. Set up GPU computing if you plan to use GPU.
  9. Login to VisionLabs registry.

Distribution unpacking#

The distribution package is an archive luna_v.5.88.0, where v.5.88.0 is a numerical identifier, describing the current LUNA PLATFORM version.

The archive includes configuration files, required for installation and exploitation. It does not include Docker images for the services. They should be downloaded from the Internet.

Move the distribution package to the directory on your server before the installation. For example, move the files to /root/ directory. The directory should not contain any other distribution or license files except the target ones.

Move the distribution to the created directory.

mv /root/luna_v.5.88.0.zip /var/lib/luna

Install the unzip archiver if it is necessary.

yum install -y unzip

Go to the folder with distribution.

cd /var/lib/luna

Unzip files.

unzip luna_v.5.88.0.zip

Create a symbolic link.

The link indicates that the current version of the distribution file is used to run LUNA PLATFORM.

ln -s luna_v.5.88.0 current

SELinux and Firewall#

You must configure SELinux and Firewall so that they do not block LUNA PLATFORM services.

SELinux and Firewall configurations are not described in this guide.

If SELinux and Firewall are not configured, the installation cannot be performed.

License activation#

To activate the license, follow these steps:

Actions from License activation manual#

Open the license activation manual and follow the necessary steps.

Note: This action is mandatory. The license will not work without following the steps to activate the license from the corresponding manual.

Specify HASP license settings#

For the HASP key, you need to specify the IP address of the licensing server. The address is set in the dump file "platform_settings.json". The contents of the default settings will be overwritten by the contents of this file when the Configurator service starts.

Open the "platform_settings.json" file.

vi /var/lib/luna/current/extras/conf/platform_settings.json

Set the server IP address with your HASP key in the "server_address" field.

{
    "value": {
        "vendor": "hasp",
        "server_address": "127.0.0.1"
    },
    "description":"License vendor config",
    "name":"LICENSE_VENDOR",
    "tags":[]
},

Save the file.

If the license is activated using the HASP key, then two parameters "vendor" and "server_address" must be specified. If you want to change the HASP protection to Guardant, then you need to add the "license_id" field.

Specify Guardant license settings#

For the Guardant key, you need to specify the IP address of the licensing server and the license ID. The settings are set in the dump file "platform_settings.json". The contents of the standard settings will be overwritten by the contents of this file at the launch stage of the Configurator service.

Open the file "platform_settings.json".

vi /var/lib/luna/current/extras/conf/platform_settings.json

Enter the following data:

  • IP address of the server with your Guardant key in the "server_address" field.
  • License ID in the format 0x<your_license_id>, obtained in the section "Save license ID" of license activation manual, in the "license_id" field.
{
    "value": {
        "vendor": "guardant",
        "server_address": "127.0.0.1",
        "license_id": "0x92683BEA"
    },
    "description":"License vendor config",
    "name":"LICENSE_VENDOR",
    "tags":[]
},

Save the file.

If the license is activated using the Guardant key, then three parameters "vendor", "server_address" and "license_id" must be specified. If you want to change the Guardant protection to HASP, then you need to delete the "license_id" field.

Docker installation#

The Docker installation is described in the official documentation.

Note: Docker version 25.0.3 was used when testing this instruction. It is not guaranteed to work with higher versions of Docker.

Quick installation commands are listed below.

Check the official documentation for updates if you have any problems with the installation.

Install dependencies:

yum install -y yum-utils device-mapper-persistent-data lvm2

Add repository:

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Install Docker:

yum -y install docker-ce docker-ce-cli containerd.io

Launch Docker:

systemctl start docker
systemctl enable docker

Check Docker status:

systemctl status docker

Docker Compose installation#

Note: Docker Compose version 2.24.6 was used when testing this instruction. It is not guaranteed to work with higher versions of Docker Compose.

Download Docker Compose binary:

curl -L "https://github.com/docker/compose/releases/download/v2.24.6/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Set execution permissions:

chmod +x /usr/local/bin/docker-compose

Create symbolic link:

ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

Choose logging method#

There are two methods to output logs in LUNA PLATFORM:

  • Standard log output (stdout).
  • Log output to a file.

Log output settings are set in the settings of each service in the <SERVICE_NAME>_LOGGER section.

If necessary, you can use both methods of displaying logs.

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

Logging to stdout#

This method is used by default and requires no further action.

It is recommended to configure Docker log rotation to limit log sizes (see "Docker log rotation").

Logging to file#

Note: When you enable saving logs to a file, you should remember that logs occupy a certain place in the storage, and the process of logging to a file negatively affects system performance.

To use this method, you need to perform the following additional actions:

  • Before launching the services: Create directories for logs on the server.
  • After launching the services: Activate log recording and set the location of log storage inside LP service containers.
  • During the launch of services: Configure synchronization of log directories in the container with logs on the server using the volume argument at the start of each container.

Synchronization of log directories is already configured in the Docker Compose script, you only need to create directories and activate logging.

See the instructions for enabling logging to files in the "Logging to server" section.

Calculations using GPU#

You can use GPU for the general calculations performed by Remote SDK.

Skip this section if you are not going to utilize GPU for your calculations.

Docker Compose v1.28.0+ is required to use the GPU.

You need to install NVIDIA Container Toolkit to use GPU with Docker containers. The example of the installation is given below.

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | tee /etc/yum.repos.d/nvidia-docker.repo

Install the nvidia-docker2 package (and dependencies) after updating the package listing:

yum clean expire-cache
yum install -y nvidia-docker2
systemctl restart docker

Check the NVIDIA Container toolkit operating by running a base CUDA container (this container is not provided in the LP distribution and should be downloaded from the Internet):

docker run --rm --gpus all nvidia/cuda:11.4.3-base-centos7 nvidia-smi

See the NVIDIA documentation for additional information.

Next, you should additionally add a deploy section to the remote-sdk field in the docker-compose.yml file.

vi /var/lib/luna/current/example-docker/docker-compose.yml
 remote-sdk:
    image: ${DOCKER_URL}/luna-remote-sdk:${LUNA_REMOTE_SDK_TAG}
    deploy:
      resources:
        reservations:
          devices:
          - driver: nvidia
            count: all
            capabilities: [gpu]
    restart: always
    ...

Here:

  • driver — This field specifies the driver for the reserved device(s).

  • count — This field specifies the number of GPU devices that should be reserved (providing the host holds that number of GPUs).

  • capabilities — This field expresses both generic and driver specific capabilities. It must be set, otherwise, an error will be returned when deploying the service.

See the Docker documentation for additional information.

Attributes extraction on the GPU is engineered for maximum throughput. The input images are processed in batches. This reduces computation cost per image but does not provide the shortest latency per image.

GPU acceleration is designed for high load applications where request counts per second consistently reach thousands. It won’t be beneficial to use GPU acceleration in non-extensively loaded scenarios where latency matters.

Login to registry#

When launching containers, you should specify a link to the image required for the container launching. This image will be downloaded from the VisionLabs registry. Before that, you should login to the registry.

Login and password can be requested from the VisionLabs representative.

Enter login .

docker login dockerhub.visionlabs.ru --username <username>

After running the command, you will be prompted for a password. Enter password.

In the docker login command, you can enter the login and password at the same time, but this does not guarantee security because the password can be seen in the command history.