Skip to content

Additional information#

This section provides the following additional information:

Create Docker registry authentication secret#

To download images with LUNA PLATFORM services you need to authorize in the Docker registry.

Create a credentials file, such as vlabs-credentials.json, containing the login and password:

{
  "auths": {
    "dockerhub.visionlabs.ru": {
      "username": "your_username",
      "password": "your_password"
    }
  }
}

Grant Kubernetes access to the registry with Docker images.

kubectl create secret generic my-dockerhub-secret --from-file=.dockerconfigjson=vlabs-credentials.txt --type=kubernetes.io/dockerconfigjson

If you have previously authorized via the docker login command, you can grant Kubernetes access using the following command:

kubectl create secret generic my-dockerhub-secret --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson

The secret can be specified during Helm chart setting.

Use GPU in Minikube#

Minikube is a tool for locally installing and managing a Kubernetes cluster. It is used by developers and testers to build and test applications in a local environment before deploying them to larger Kubernetes clusters.

The use of GPUs in Minikube is only supported from version 1.32.

Each LUNA PLATFORM service that supports GPU running automatically creates GPU processes, regardless of which resources (CPU or GPU) are installed. If more than one GPU service is running, the GPU resources must be shared between them to avoid possible errors caused by video card access conflicts.

See official NVIDIA documentation for more information about GPU resource sharing.

To isolate services from the GPU and prevent them from creating additional processes, set the CUDA_VISIBLE_DEVICES/NVIDIA_VISIBLE_DEVICES environment variable to none for those services that use the GPU and should not be used.

env:
  - name: CUDA_VISIBLE_DEVICES
    value: none

VLMatch library compilation for Oracle#

Note: The following instructions describe the installation for Oracle 21c.

All files required to compile a user-defined extension (UDx) into VLMatch can be found in the following directory:

/var/lib/luna/luna_v.5.62.3/extras/VLMatch/oracle

To compile the VLMatch UDx function you need to:

sudo yum install gcc g++ 
  • Change the SDK_HOME — oracle sdk root variable (default is $ORACLE_HOME/bin, check that the $ORACLE_HOME environment variable is set) in the makefile.
vi /var/lib/luna/luna_v.5.62.3/extras/VLMatch/oracle/make.sh
  • Open the directory and run the "make.sh" file.
cd /var/lib/luna/luna_v.5.62.3/extras/VLMatch/oracle
chmod +x make.sh
./make.sh
  • Define the library and function inside the database (from the database console):
CREATE OR REPLACE LIBRARY VLMatchSource AS '$ORACLE_HOME/bin/VLMatchSource.so';
CREATE OR REPLACE FUNCTION VLMatch(descriptorFst IN RAW, descriptorSnd IN RAW, length IN BINARY_INTEGER)
   RETURN BINARY_FLOAT 
AS
   LANGUAGE C
   LIBRARY VLMatchSource
   NAME "VLMatch"
   PARAMETERS (descriptorFst BY REFERENCE, descriptorSnd BY REFERENCE, length UNSIGNED SHORT, RETURN FLOAT);
  • Test the function by calling (from the database console):
SELECT VLMatch(HEXTORAW('1234567890123456789012345678901234567890123456789012345678901234'), HEXTORAW('0123456789012345678901234567890123456789012345678901234567890123'), 32) FROM DUAL;

The result should be "0.4765625".

Transfer the generated VLMatchSource.so file to the Oracle DBMS.