OCI#

In order to stream data from Oracle Cloud Infrastructure (OCI) storage buckets when training models, MCLI will need access to your OCI credentials.

To set up OCI SSH keys and SDK, please consult the Oracle Cloud Infrastructure documentation here. Specifically, there are two files you will need to generate or locate:

1. Config File: Locate the SDK/CLI configuration files using this guide. A sample config file would look like:

[DEFAULT]
user=ocid1.user.oc1..<unique_ID>
fingerprint=<your_fingerprint>
key_file=~/.oci/oci_api_key.pem
tenancy=ocid1.tenancy.oc1..<unique_ID>
region=us-ashburn-1

[ADMIN_USER]
user=ocid1.user.oc1..<unique_ID>
fingerprint=<your_fingerprint>
key_file=keys/admin_key.pem
pass_phrase=<your_passphrase>

2. Key File: Generate the required keys and OCIDs using this guide. The public key in PEM format looks something like this:

-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQE...
...
-----END PUBLIC KEY-----

Warning

Your OCI private keys must be generated with no passphrases as runs are non-interactive.

Once both files are obtained, create the OCI secret with:

mcli create secret oci

Follow the prompts to name the secret and specify the location of the files:

> mcli create secret oci
? What would you like to name this secret? my-oci-secrets
? Where is your OCI config file located? ~/.oci/config
? Where is your OCI key file located? ~/.oci/oci_api_key.pem
✔  Created secret: my-oci-secrets

What happens when you run the above commands?#

Once configured, we mount these secrets inside all of your runs and export three environment variables:

  • $OCI_CONFIG_FILE: Path to your config file.

  • $OCI_CLI_CONFIG_FILE: Path to the config file for using OCI through the CLI.

  • $OCI_CLI_KEY_FILE: Path to your API signing private key file for using OCI through the CLI.

Libraries like oci will use these environment variables by default to discover your OCI credentials