Skip to content

Latest commit

 

History

History

runtimeKey

This application is used as reference code for developers to show how to use the C++ API to generate a runtime key. Once a runtime key is generated it must be activated to produce a token.

Dependencies

The SDK is developed in C++11 and you'll need glibc 2.27+ on Linux and Microsoft Visual C++ 2015 Redistributable(x64) - 14.0.24123 (any later version is ok) on Windows. You most likely already have these dependencies on you machine as almost every program require it.

Debugging missing dependencies

To check if all dependencies are present:

GPGPU acceleration

  • On x86-64, GPGPU acceleration is disabled by default. Check here for more information on how to enable it.

Pre-built binaries

If you don't want to build this sample by yourself, then use the pre-built versions:

Building

You'll need CMake to build this sample.

  • Create build folder and move into it: mkdir build && cd build

To generate the build files:

  • Windows (Visual Studio files): cmake .. -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=Release
  • Linux (Makefile): cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release

To build the project:

  • Windows: Open the VS solution and build the projet
  • Linux: Run make to build the project

Testing

After building the application you can test it on your local machine.

Usage

runtimeKey is a command line application with the following usage:

runtimeKey \
      --assets <path-to-assets-folder> \
      [--json <json-output:bool>] \
      [--type <license-type:string>]
      

Options surrounded with [] are optional.

  • --assets Path to the assets folder containing the configuration files and models. Default value is the current folder.
  • --json Whether to output the runtime license key as JSON string intead of raw string. Default: true.
  • --type Defines how the license is attached to the machine/host. Possible values are aws-instance, aws-byol, azure-instance or azure-byol. Default: null. More info here.

Examples

  • On Linux x86_64 you may use the next command:
LD_LIBRARY_PATH=../../../binaries/linux/x86_64:$LD_LIBRARY_PATH ./runtimeKey \
    --json true \
    --assets ../../../assets
  • On Windows x86_64, you may use the next command:
runtimeKey.exe ^
    --json true ^
    --assets ../../../assets

Amazon Web Services (AWS) and Microsoft Azure

Please read this if you're planning to run the SDK on Amazon AWS or Microsoft Azure.