Environment Variable Definitions#

Using lookup Function In Config Template#

The config template yml file contains several inputs about the infrastructure and application’s needs. For ease of use, some of these are wired to lookup environment variables. For example {{ lookup(‘env’, ‘NGC_CLI_API_KEY’) }} is expanding it to the NGC_CLI_API_KEY environment variable. What this means is, we can set an environment variable for NGC_CLI_API_KEY with its value and Deployment Script can access it automatically.

By default the sample environment variable files examples folder provides look like below. Based on need you can make more environment variables and use lookup function in config-template yaml file.

cat my-config.env
export OPENAI_API_KEY="<replace-with-actual-value>"
export NGC_CLI_API_KEY="<replace-with-actual-value>"
export NVIDIA_API_KEY="<replace-with-actual-value>"
export APP_HOST_IPV4_ADDR="<replace-with-actual-value>"
export APP_HOST_SSH_USER="<replace-with-actual-value>"
export COTURN_HOST_IPV4_ADDR="<replace-with-actual-value>"
export COTURN_HOST_SSH_USER="<replace-with-actual-value>"

Below table explains the purpose of each environment variable used in the examples folder.

Environment Variable Definition#

Environment Variable

Definition

OPENAI_API_KEY

Key to access OpenAI’s models through the API

NGC_CLI_API_KEY

Key to access NGC resources thru command line. Such as Helm charts, Models, Container images etc.

NVIDIA_API_KEY

Key to access NGC resources thru command line. Such as Helm charts, Models, Container images etc. This one is specifically used to access Nvidia NIMs.

APP_HOST_IPV4_ADDR

IP address of Application instance. IPV4 format.

APP_HOST_SSH_USER

OS user name on Application instance.

COTURN_HOST_IPV4_ADDR

IP address of Controller instance. IPV4 format. In this case it is same as APP_HOST_IPV4_ADDR

COTURN_HOST_SSH_USER

OS user name on Application instance. In this case it is same as APP_HOST_SSH_USER

Caution

If you modify your <my-env-file.env> file or start a new shell, you will have to run source <my-env-file.env> again before running ./envbuild.sh command.