☁️ OCI Configuration

Oracle Cloud Infrastructure (OCI) can optionally be configured to enable additional AI Optimizer functionality including:

Configuration

OCI can either be configured through the AI Optimizer interface, a CLI Configuration File, or by using environment variables.
You will need to generate an API Key to obtain the required configuration values.


Interface

To configure the Database from the AI Optimizer, navigate to Configuration -> OCI:

OCI Config OCI Config

OCI GenAI Services can be configured once OCI access has been confirmed:

OCI GenAI Config OCI GenAI Config

Provide the values obtained by generating an API Key.


Config File

Depending on the runtime environment, either Bare Metal or Containerized, your local CLI Configuration File can be used to configure AI Optimizer for OCI access.

In addition to the standard configuration file, two additional entries are required to enable OCI GenAI Services:

  • service_endpoint: the URL endpoint for the OCI GenAI Service
  • compartment_id: the compartment OCID of the OCI GenAI Service

Bare Metal

During startup, the AI Optimizer will automatically look for and consume a CLI Configuration File for configuring OCI access.

Container

When starting the container, volume mount the configuration file to /app/.oci for it to be used.

For example:

podman run -v ~/.oci:/app/.oci -p 8501:8501 -it --rm ai-optimizer-aio

Environment Variables

The AI Optimizer can use environment variables to configure OCI. Environment variables will take precedence over the CLI Configuration file.

In addition to the standard environment variables, the following variables can be set to enable OCI GenAI Services:

  • OCI_GENAI_SERVICE_ENDPOINT: the URL endpoint for the OCI GenAI Service
  • OCI_GENAI_COMPARTMENT_ID: the compartment OCID of the OCI GenAI Service

You can also configure OCI using environment variables when running in a container. However, this approach can be tedious, as it requires specifying the contents of the API key directly, rather than referencing a file.

For example:

podman run \
 -e OCI_CLI_USER=<user_ocid> \
 -e OCI_CLI_KEY_CONTENT=<api key> \
 -p 8501:8501 -it --rm ai-optimizer-aio