Adding Licenses for the First Time

Specifying a License File for the Driverless AI Application

A license file to run Driverless AI can be added in one of three ways when starting Driverless AI.

  • Specifying the license.sig file during launch in native installs

  • Using the DRIVERLESS_AI_LICENSE_FILE and DRIVERLESS_AI_LICENSE_KEY environment variables when starting the Driverless AI Docker image

  • Uploading your license in the Web UI

Specifying the license.sig File During Launch

By default, Driverless AI looks for a license key in /opt/h2oai/dai/home/.driverlessai/license.sig. If you are installing Driverless AI programmatically, you can copy a license key file to that location. If no license key is found, the application will prompt you to add one via the Web UI.

Specifying Environment Variables

You can use the DRIVERLESS_AI_LICENSE_FILE or DRIVERLESS_AI_LICENSE_KEY environment variable when starting the Driverless AI Docker image. For example:

nvidia-docker run \
--pid=host \
--rm \
--shm-size=2g --cap-add=SYS_NICE --ulimit nofile=131071:131071 --ulimit nproc=16384:16384 \
-u `id -u`:`id -g` \
-p 12345:12345 \
-e DRIVERLESS_AI_LICENSE_FILE="/license/license.sig" \
-v `pwd`/config:/config \
-v `pwd`/data:/data \
-v `pwd`/log:/log \
-v `pwd`/license:/license \
-v `pwd`/tmp:/tmp \
h2oai/dai-ubi8-x86_64:1.10.7-cuda11.2.2.xx

or

nvidia-docker run \
--pid=host \
--rm \
--shm-size=2g --cap-add=SYS_NICE --ulimit nofile=131071:131071 --ulimit nproc=16384:16384 \
-u `id -u`:`id -g` \
-p 12345:12345 \
-e DRIVERLESS_AI_LICENSE_KEY="Y0uRl1cens3KeyH3re" \
-v `pwd`/config:/config \
-v `pwd`/data:/data \
-v `pwd`/log:/log \
-v `pwd`/license:/license \
-v `pwd`/tmp:/tmp \
h2oai/dai-ubi8-x86_64:1.10.7-cuda11.2.2.xx

Uploading Your License in the Web UI

If Driverless AI does not locate a license.sig file during launch, then the UI will prompt you to enter your license key after you log in the first time.

License file prompt

Click the Enter License button, and then paste the entire license into the provided License Key entry field. Click Save when you are done. Upon successful completion, you will be able to begin using Driverless AI.

License key entry

Specifying a License for Scoring Pipelines

When deploying models to production, Driverless AI requires a license to be specified in order to run both the Python and MOJO Scoring Pipelines.

Python Scoring Pipeline

The license can be specified via an environment variable in Python:

# Set DRIVERLESS_AI_LICENSE_FILE, the path to the Driverless AI license file
%env DRIVERLESS_AI_LICENSE_FILE="/home/ubuntu/license/license.sig"

# Set DRIVERLESS_AI_LICENSE_KEY, the Driverless AI license key (Base64 encoded string)
%env DRIVERLESS_AI_LICENSE_KEY="oLqLZXMI0y..."

You can also export the license file when running the scoring pipeline:

export DRIVERLESS_AI_LICENSE_FILE="/path/to/license.sig"
bash run_example.sh

MOJO Scoring Pipeline

Driverless AI requires a license to be specified in order to run the MOJO Scoring Pipeline. The license can be specified in one of the following ways:

  • Via an environment variable:

    • DRIVERLESS_AI_LICENSE_FILE: Path to the Driverless AI license file, or

    • DRIVERLESS_AI_LICENSE_KEY: The Driverless AI license key (Base64 encoded string)

  • Via a system property of JVM (-D option):

    • ai.h2o.mojos.runtime.license.file: Path to the Driverless AI license file, or

    • ai.h2o.mojos.runtime.license.key: The Driverless AI license key (Base64 encoded string)

  • Via an application classpath:

    • The license is loaded from a resource called /license.sig.

    • The default resource name can be changed via the JVM system property ai.h2o.mojos.runtime.license.filename.

For example:

java -Dai.h2o.mojos.runtime.license.file=/etc/dai/license.sig -cp mojo2-runtime.jar ai.h2o.mojos.ExecuteMojo pipeline.mojo example.csv

Driverless AI Licenses in Production via AWS Lambdas

Driverless AI deployment pipelines to AWS Lambdas automatically set the license key as an environment variable based on the license key that was used in Driverless AI.