Skip to main content

HowTo: Set environment variables

This document is to explain how to setup the environment variables you need to dynamically adjust your application setting to meet your environment requirements when creat Interactive Containers / VCS Instance via the TWSC user site and TWCC CLI.

info

This function is only available for certain image:

  • Interactive Containers:Most of them are available (If you need to use Matlab(public preview version) and Custom Image, please contact Technical Support Services ).
  • VCS Instance:Linux image.

e.g.:If you use TensorFlow image file to create a container, you can set the TF_DISABLE_CUDNN_RNN_TENSOR_OP_MATH environment variable to enable/disable the Tensor Core math when you create the container.

TensorFlow image enable Tensor Core math by default:

Environmental Variables Preset Values (Key=Value):TF_DISABLE_CUDNN_RNN_TENSOR_OP_MATH=0

You can configure a value of 1 to set it to disable, when creating the container:

Step 1. Create containers / VCS Instance and setup the environment variables

info

The following is an example of the Interactive Containers, VCS Instance is setup in the same way, setting the environment variables when creating the instance.s

When you create the container, setup the environment variables in the "Environment Variables" page and create the container, then the deployment is done.

info

The environmental variables Key and Value are set in the following format (JSON), and multiple variables can be set at once:

    {
"Key1":"Value-a",
"Key2":"Value-b",
"Key3":100
}

Step 2. Confirm environment variables

Connect to a container and use the following command to confirm that the environment variables are imported to the container.

echo $BUFFER
info

Connect to a VCS Instance and confirm that the environment variables are imported to the instance using the following commands.

echo $Key

# Enter your key, e.g., $TF_DISABLE_CUDNN_RNN_TENSOR_OP_MATH