AI Workbench and Brev Integration#

Note

This is currently an experimental feature of NVIDIA AI Workbench for existing Brev users to test and provide feedback. This feature requires the Brev CLI. Be sure you have the Brev CLI on your system (Mac/Linux) or in the AI Workbench distro (Windows).

This feature lets you configure an existing Brev instance as a Workbench location without having to do the usual manual installation and configuration. For more information, see AI Workbench Locations.

Use this documentation for the following:

Prerequisites#

Before you can use a Brev instance with AI Workbench, you must have the following:

  • AI Workbench installed locally.

  • A Brev account. You can signup or login to Brev with Google or GitHub credentials.

  • The latest version of the Brev CLI installed locally.

If the Brev CLI is not installed, you can install it from the command line.

See the Brev documentation for the commands for Mac and Ubuntu.

Note

On Windows you need to install the Brev CLI into the NVIDIA AI Workbench WSL distribution, NVIDIA-Workbench, with sudo privileges.

However, sudo privileges are blocked in the distribution, and you must enter it as root from a Windows shell or Powershell.

You can install the Brev CLI into the NVIDIA-Workbench WSL distribution with the following command:

1wsl -d NVIDIA-Workbench -u root -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/brevdev/brev-cli/main/bin/install-latest.sh)"

Get a Cloud Instance on Brev#

Use the following procedure to get a cloud instance on Brev.

  1. Log in to the Brev console.

  2. Open the Instances tab if it is not already open.

  3. Select New.

  4. Select VM Mode.

    Note

    Preinstalling Jupyter is not necessary.

  5. Open the Cloud tab.

  6. Under Provider, select a provider, for example, GCP. This updates the GPU list with available GPUs in that provider.

  7. Select the GPU type from the horizontal bar. This lists the GPUs available, for example, NVIDIA A10.

  8. Select the desired configuration from the vertical list. This lists the different GPU instance configurations available for that GPU type on that provider.

  9. Under Name Instance provide a short name for your instance, like My-A10-instance.

  10. Select Deploy. This launches your instance in Brev. You may have to wait several minutes for the instance to start.

Use the Integration to Configure Your Brev Instance as a Location#

Once you have a cloud instance available in Brev, you can use the AI Workbench integration with Brev to add the cloud instance as an AI Workbench location.

  1. Open a command shell by doing one of the following:

    • On macOS or Ubuntu — Open a terminal.

    • On Windows — Open the NVIDIA-Workbench WSL terminal by selecting it from the Windows terminal application. When the terminal opens, you should see a command prompt similar to the following:

    1workbench@computer-name:~$
    

    Tip

    You can also use the Windows Command Prompt or Windows PowerShell to access the distro with the command wsl -d NVIDIA-Workbench.

  2. Log in to your Brev account.

    1brev login
    

    Follow the instructions provided to log in using either the browser link or the CLI command link provided.

  3. If you have more than one organization, point Brev to the appropriate organization.

    1brev set <org-name>
    

    For example, if j_smith-hq is your organization name, you would enter:

    1brev set j_smith-hq
    
  4. To configure your Brev instance as a location, run the following command.

    1nvwb create context --brev-instance-name <my-brev-instance>
    

    When prompted, select Yes to continue connecting.

  5. To view the new brev instance in your list of available locations, run the following code.

    1nvwb list contexts
    

    The output should look similar to the following.

    1        NAME             |        DESCRIPTION          |     HOSTNAME     |      STATUS     | EXTERNAL ACCESS
    2-------------------------|-----------------------------|------------------|-----------------|----------------------
    3brev-<my-brev-instance>  | Brev managed instance       | <host-ip>        | Not Running     |   Not Enabled
    4                         | <gpu-name> (gpu)            |                  |                 |
    5local                    | My Computer                 | localhost        | Not Runnng      |   Not Enabled
    
  6. To activate your Brev instance, run the following code.

    1nvwb activate <my-brev-instance>
    

Use Your Brev Instance With AI Workbench#

After you configure your Brev instance, you can use either the AI Workbench CLI or the AI Workbench desktop application to work with it. For more information, see Basic Quickstart and Basic Quickstart (CLI).

In the desktop application, choose your Brev location similar to any local or remote location. Your Brev instances appear with brev prepended to the name in AI Workbench.