NVIDIA Managed Service Overview

cuOpt is securely hosted by NVIDIA and uses the NVIDIA Identity Federation API Key to access the service, enabling you to easily adapt and experiment with cuOpt.

Quickstart Guide

By the end of this quickstart, you will have set up your NGC account and installed the cuOpt thin client and you will be ready to run a cuOpt managed service example.

Step 1: NGC Account Setup

An NGC org (organization) is a dedicated virtual instance used to enable and manage NVIDIA cloud services. Upon your approval to the cuOpt Cloud Service program, you are added to an NGC org that provides all the necessary access to NVIDIA cloud service.

Please contact NVIDIA Support for additional details.

To get started with the cuOpt service, first you will need to have an NGC account if you do not already have an account.

  1. Sign up for a free NGC org through the NGC sign-in portal and create a new NVIDIA account.

  2. Click on the link within the NGC Welcome email to accept the invitation to the org.

    Note

    Please refer to the NGC documentation for further details.

    The following cuOpt Service landing page is displayed.

    _images/image4.png

Step 2: Setup the Python Environment

Prior to setting up the Python thin client, we’ll create a Python virtual environment to use for the installation. This allows us to install any Python scripts or libraries specifically for this service.

Note

Supported OSes include Linux, WSL, and macOS.

  1. First, ensure that Python 3.9+ is installed on the system. You can check the version of Python that’s installed using the command below.

    python3 --version
    
  2. Install the Python virtual environment package.

    • For installation on macOS, run:

      pip3 install virtualenv
      
    • For installation on Ubuntu, run:

      apt install python3.10-venv
      
  3. Next, make sure you’re in a proper working directory, such as your home directory, and create a virtual environment within that directory.

    1cd ~
    2python3 -m venv cuopt-service-env
    
  4. Activate the new environment by running the following command.

    source cuopt-service-env/bin/activate
    
  5. Proceed to the next step to download and set up the Python thin client into this environment.

Step 3: Installing Thin Client Using Pip Index

  1. Whenever thin clients need to be updated or installed, you can directly install it using NVIDIA pip index.

    pip install --upgrade --extra-index-url https://pypi.nvidia.com cuopt-thin-client
    
  2. For more information navigate to Managed Service Thin Client

Step 4: Obtain Credentials for cuOpt Managed Service

NVIDIA Identity Federation API Key

Note

There are two types of API Keys, Run Keys and Service Keys. Service keys may only be created by Org Owners and are designed for use in automation. Most users will create a Run Key.

  1. The NVIDIA Identity Federation API Key is used to authenticate with cuOpt managed service.

  2. Log into the NGC org that has been created for you.

  3. Select the CLOUD FUNCTION tab on the left side panel and choose Functions.

  4. Select the shared functions tile to check the functions that are available.

  5. Note down the function id with name cuopt.

    _images/cuopt_landing_page.png
  6. For Org Owners only

    1. Select ORGANIZATION -> Service Keys.

      _images/service_keys.png
    2. Select Create Service Key in the top right corner.

    3. Fill in the details and choose the expiration, as per your need and as shown below, then generate key.

    4. Select a particular function id rather than all function options.

    5. This function id can be found in CLOUD FUNCTION -> Functions -> Shared Functions.

    6. The name of the of the function would be cuopt.

      _images/service_key_creation.png
    7. Save this key since you will not be able to retrieve the same one, but you can rotate the key to get a new one in the same page.

  7. For all org users

    1. Select the CLOUD FUNCTION tab on the left side panel and choose Functions.

    2. Select Generate Run Key to generate the NVIDIA Identity Federation API Key.

      _images/cloud_functions.png
    3. Save this key and share it carefully since these keys cannot be deleted or disabled like service keys.

    4. This will be valid for a month from the date of creation.

    5. This key provides access to cloud functions available at the time of its creation.

      • If a new cloud function is added later, then this key will not have access to that function.

      • You will need to create a new key to access new cloud functions.

Step 5: Adding Users to Your NGC Org

  1. Navigate to ORGANIZATION -> Users, you will see the option to Invite User on the right corner.

    _images/users.png
  2. Select Invite User and fill the details as shown below:

    1. Fill in the name and email-id.

    2. Choose Organization under Roles.

    3. Select the following roles:
      • CuOpt Service -> CuOpt User

      • Cloud Functions -> Viewer

      • It is up to you whether you want to provide any admin authorities using Organization.

    4. Choose Add Role on right side to add these settings.

      _images/add_role.png
  3. Ensure that only the following set of roles are set as shown below; delete the Registry Read role.

    _images/invite_user.png
  4. Select Invite User on the top right corner to invite the user.

  5. For more information on adding users, visit the NGC documentation.

Step 6: Run a cuOpt managed service example

To solve a sample cuOpt problem please navigate to the cuOpt Thin Client Examples