Environment Variable Definitions#

Environment Variables#

By default, the sample environment variable files in the examples folder look like the one below. Based on your needs, you can create more environment variables and use the lookup function in the 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 ELEVENLABS_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>"

The table below 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.

ELEVENLABS_API_KEY

Key to access ElevenLabs API

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 COTURN instance. IPV4 format. In this case it is same as APP_HOST_IPV4_ADDR

COTURN_HOST_SSH_USER

OS user name on COTURN 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.

Using lookup Function in Config Template#

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