User Guide (Latest)
User Guide (Latest)

AI Workbench Command Line Interface (CLI) Reference

NVIDIA AI Workbench is a developer toolkit for data science, machine learning, and AI project development. For users who prefer working in a terminal, AI Workbench provides a Command Line Interface (CLI). For the current and historical versions of the AI Workbench CLI, see Release Notes.

Tip

To get started with the AI Workbench CLI, see Basic Quickstart (CLI).

The following options are available for all AI Workbench CLI commands.

Option

Description

Type

Default Value

Valid Values

--context, -c The name of the context (location) to use when running the command. This is useful for scripting and when you don’t activate a context before you run a command. String
--debug Run the command with debug logging.
--help, -h Provides help for the command.
--output, -o Determines the format of the output from the command. Set to json for JSON. Set to default for human readable text. If your terminal has TTY support, the output is rendered with styling. String default default, json
--project, -p The absolute path to the project to use when running the command. This is useful for scripting when you are not opening a project before you run a command. If you have a project open, and you run a command with this option, this option overrides the open project. String
--workbench-dir The path of the AI Workbench directory. Use this option when you install AI Workbench in a directory different from the default directory. String ~/.nvwb

Synopsis

Copy
Copied!
            

nvwb activate <context_name> [options]

Description

Activates the context (location) specified by context_name. context_name is required. For more information, see AI Workbench Locations.

When you activate a context, the AI Workbench service starts, and your container runtime (Docker or Podman) starts.

After you activate a context, all subsequent CLI commands use the context by default, so you don’t need to specify the --context option.

Tip

Use list contexts to see the existing contexts before you run activate.

Options

This command accepts relevant global options.

Examples

To activate the local context (location), run the following code.

Copy
Copied!
            

nvwb activate local

You should see output similar to the following.

Copy
Copied!
            

Connecting to local │ Please wait until AI Workbench is started and ready.

In addition, your command prompt changes to add the context (location) name, similar to the following.

Copy
Copied!
            

workbench@computer:~$ (nvwb:local) workbench@computer:~$

Synopsis

Copy
Copied!
            

nvwb add package [package-manager] [package-reference] [options]

Description

Adds one or more packages to the currently open project, or a specified project. For more information, see Packages.

package-manager is the name of the package manager, such as apt or pip, that should add the specified package. Package managers are configured in the project’s base environment.

package-reference is the name of the package to remove, or the package name and version information. You can specify multiple packages separated by a space for the same package manager.

If you don’t specify package-manager or package-reference, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list packages to see the existing packages before you run add package.

Options

This command accepts relevant global options.

Examples

To add a package, for example NumPy, run the following code.

Copy
Copied!
            

nvwb add package pip numpy

You should see output similar to the following.

Copy
Copied!
            

Package Manager: pip PACKAGE | VERSION SPECIFICATION(S) | INSTALLED IN BASE ------------|--------------------------|------------------- jupyterlab | >3.0 | false numpy | | false

Synopsis

Copy
Copied!
            

nvwb attach [options]

Description

Attach to the container of the currently open project, or a specified project. Use this command when you need to open a shell session in the project container, or on the host computer running the AI Workbench service.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--host Attach to the host computer running the AI Workbench service.

Synopsis

Copy
Copied!
            

nvwb build [options]

Description

Builds the container for the currently open project, or a specified project, or stops a build. For more information, see AI Workbench Projects.

Tip

Use status to see the status of the project before you run build.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--full-build Regenerate the container file and force a full build.
--stop Stop the current container build.

Examples

To rebuild the container for the current project, run the following code.

Copy
Copied!
            

nvwb build --full-build

While the build is running, you should see output similar to the following.

Copy
Copied!
            

⣟ Building Environment ██████████████████████████████████████████████████ 28/28

When the build completes, you should see output similar to the following.

Copy
Copied!
            

✓ Container build complete (22.047173156s)

Synopsis

Copy
Copied!
            

nvwb clone project [remoteURL] [options]

Description

Clones an existing Git repository into an AI Workbench project in the currently open context (location), or a specified context. For more information, see Git in AI Workbench.

remoteURL is the URL of the existing repository to clone. If you don’t specify remoteURL, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Note

Before you can use CLI commands that perform Git actions, you must connect to your Git account from AI Workbench. For more information, see connect integration or Connect to Your Git Account and Other Integrations.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--projectPath The absolute path to a directory where the project should be cloned. If not specified, the project is cloned into the default project directory. String

Examples

To clone a project, run the following code.

Copy
Copied!
            

nvwb clone project <url of repository>

You should see output similar to the following.

Copy
Copied!
            

✓ Project Clone complete (4.006585582s) Cloned project 'hello-world' (/home/workbench/nvidia-workbench/project-directory) ✓ Container build complete (15.070521811s)

Note

After you clone a project, the project does not open automatically. To work in your new project, close any current project and open the new project.

Synopsis

Copy
Copied!
            

nvwb close [options]

Description

Closes the currently open project in the current context (location). For more information, see AI Workbench Projects.

Options

This command accepts relevant global options, and the following additional options.

Note

close does not support the global options --context or --project.

Option

Description

Type

Default Value

Valid Values

--force, -f If apps or the project container are running, stop them first, and then close the project.

Examples

To close a project, run the following code.

Copy
Copied!
            

nvwb close

There is no output, but your command prompt changes to remove the project name, similar to the following.

Note

Even though you close the project, the project is still the current directory in your terminal.

Copy
Copied!
            

(nvwb:local/hello-world) workbench@computer:~/nvidia-workbench/hello-world$ (nvwb:local) workbench@computer:~/nvidia-workbench/hello-world$

Synopsis

Copy
Copied!
            

nvwb commit [options]

Description

Stages and commits all new, modified, and deleted files. For more information, see Git in AI Workbench.

Use the --message to specify a log message. If you don’t specify --message, AI Workbench creates a message for you, and you can edit the message interactively by using the tab keys.

Note

Before you can use CLI commands that perform Git actions, you must connect to your Git account from AI Workbench. For more information, see connect integration or Connect to Your Git Account and Other Integrations.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--message, -m A log message that describes the changes to commit. The message is limited to 50 characters. String
--overrideWarnings Override any warnings and suggested remediation.

Examples

To commit changes in your project, run the following code.

Copy
Copied!
            

nvwb commit --message "Important changes"

You should see output similar to the following.

Copy
Copied!
            

Successfully Staged and Committed all changes in project 'hello-world'

Synopsis

Copy
Copied!
            

nvwb configure mounts [source1:target1] [source2:target2] [options]

Description

Configures existing mounts for the currently open project, or a specified project. If you want to create a new mount use create mount instead. This command overrides any current configuration for a mount. For more information, see AI Workbench Mounts.

Warning

You can’t run this command while the project container is running. Use status and stop to ensure the project container is stopped before you run this command.

Specify source:target where source is the directory in the currently open context (location), or a specified context to mount into the project container, and target is the new directory in the project container.

You can specify more than one source:target separated by spaces.

If you don’t specify source:target, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list mounts to see the existing mounts before you run configure mounts.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--wide Include all available columns in the output.

Synopsis

Copy
Copied!
            

nvwb configure secrets [variable1:value1] [variable2:value2] [options]

Description

Configures existing secret variables for the currently open project, or a specified project. If you want to create a new secret variable use create secret instead. This command overrides any current value for a secret variable. For more information, see Secrets (Sensitive Environment Variables).

Warning

You can’t run this command while the project container is running. Use status and stop to ensure the project container is stopped before you run this command.

Specify variable:value where variable is the name of the secret variable and value is the new value for the secret variable. You can specify more than one variable:value separated by spaces.

If you don’t specify variable:value, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list secrets to see the existing secrets before you run configure secrets.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--wide Include all available columns in the output.

Examples

To set the value of a secret variable named test1, run the following code.

Copy
Copied!
            

nvwb configure secrets test1:123456789 --wide

You should see output similar to the following.

Note

The value of the secret variable appears with all but the last 3 digits hidden.

Copy
Copied!
            

1 secrets configured VARIABLE | DESCRIPTION | CONFIGURED | VALUE ----------|-------------|------------|----------- test1 | Test var 1 | true | ******789

Synopsis

Copy
Copied!
            

nvwb create integration [options]

Description

Creates an integration, such as GitHub or GitLab, and authorizes AI Workbench to make calls on behalf of the AI Workbench user. For more information, see AI Workbench Integrations.

When you run this command, an interactive prompt appears, and you can type and use the arrow keys to make your selections. If you want to create an integration without using the interactive interface, add a JSON configuration file for the integration to ~/.nvwb/ or C:\Users\<username>\AppData\Local\NVIDIA Corporation\AI Workbench\.

Tip

Use list integrations to see the existing integrations before you run create integration.

Options

This command accepts relevant global options.

Examples

To create an integration, run the following code.

Copy
Copied!
            

nvwb create integration

An interactive prompt appears. When you are done creating the integration, you should see output similar to the following.

Copy
Copied!
            

NAME | DESCRIPTION | CREDENTIALS | CONNECTED -----------|----------------|-------------------------|----------- NGC | ngc.nvidia.com | container-registry | false Github | Github.com | git, container-registry | true Gitlab | Gitlab.com | git | false

Synopsis

Copy
Copied!
            

nvwb create app [app-name] [app-type] [options]

Description

Creates an app in the currently open project, or a specified project. For more information, see AI Workbench Applications.

Warning

You can’t run this command while the project container is running. Use status and stop to ensure the project container is stopped before you run this command.

Specify app-name to give the application a name in your project.

app-type is the type of the application. Use custom to add a custom app to your project. When you add a custom app to your project you must specify the options required to run your application.

Use vs-code jupyterlab to add a built-in app type to your project. When you add a built-in app to your project, you don’t have to specify any options.

If you don’t specify the app name, app type, or required options, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list apps to see the existing apps before you run create app.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--app-class The class of application, used to determine what optional configuration options are available. String process, webapp
--health-check-cmd The shell command used to check the health or status of the application. A return of zero means the application is running and healthy. A return of non-zero means that the application is not running or unhealthy. String
--icon-url An optional link to the icon or image used for the application. String
--process-wait-until-finished Available if --app-class is process. True if the AI Workbench desktop application should wait for the application to finish; false if the desktop app should let it run in the background. If true the desktop app notifies you when the process completes. The CLI always waits. Boolean true true, false
--start-cmd The shell command used to start the application. Must not be a blocking command. String
--stop-cmd The shell command used to stop the application. String
--timeout-seconds The number of seconds that AI Workbench waits for the health_check_command to complete. Integer 60 Greater than 0 and less than 3600
--user-msg An optional message that appears to the user when the application is running. If --app-class is webapp, you can use the placeholder string {{URL}} in the message, and it is populated after the app starts. String
--webapp-auto-launch Available if --app-class is webapp. True if AI Workbench should automatically open the application URL for the user; otherwise, false. Boolean true true, false
--webapp-port Available if --app-class is webapp. The port that the application runs on. String
--webapp-proxy-trim-prefix Available if --app-class is webapp. True if the AI Workbench reverse proxy should remove the application-specific URL prefix before forwarding the request to the application; otherwise, false. Boolean false true, false
--webapp-url The static URI used to access a web application. If --app-class is webapp, you must specify --webapp-url or --webapp-url-cmd, but not both. String
--webapp-url-cmd The shell command used to get the URI for a web application. The output from this command is considered the URL. If --app-class is webapp, you must specify --webapp-url or --webapp-url-cmd, but not both. String

Examples

To create a new app in your project, of the built-in vs-code type, run the following code.

Copy
Copied!
            

nvwb create app "test app" vs-code

You should see output similar to the following.

Copy
Copied!
            

NAME | TYPE | CLASS | RUN STATE -------------|------------|--------|------------- test app | vs-code | native | ⚫ Stopped jupyterlab | jupyterlab | webapp | ⚫ Stopped

To create a new custom app in your project, run code similar to the following.

Tip

You can find more details about this example in Walkthrough: Add a Custom Application.

Copy
Copied!
            

nvwb create app simple-gradio custom --app-class=webapp --health-check-cmd="curl -f http://localhost:8080/" --start-cmd="cd /project/code && PROXY_PREFIX=$PROXY_PREFIXpython3 app.py" --stop-cmd="pkill -f '^python3 app.py'" --webapp-port=8080 --webapp-url="http://localhost:8080/" --webapp-auto-launch

You should see output similar to the following.

Copy
Copied!
            

NAME | TYPE | CLASS | RUN STATE ----------------|------------|--------|------------- simple-gradio | custom | webapp | ⚫ Stopped jupyterlab | jupyterlab | webapp | ⚫ Stopped

Synopsis

Copy
Copied!
            

nvwb create context [context_name] [hostname] [options]

Description

Creates a new context (location) to run AI Workbench projects. For more information, see AI Workbench Locations.

context_name is the name for the context. context_name is limited to 47 characters using [a-zA-Z0-9-_].

hostname is the hostname or IP address of the computer for the context. Specify localhost if the new context is the same computer that you are running the CLI on.

If you don’t specify a required option, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list contexts to see the existing contexts before you run create context.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--accept-ssh-fingerprints Accept the SSH fingerprints for the context (location).
--context-workbench-dir The internal workbench directory where the workbench service stores configuration and internal data. For most installations this is /home/<username>/.nvwb, which is the default directory. String
--description, -d A description for the context (location). String
--ssh-key-path The path to the SSH key to use when you connect to this context (location). For keys held by ssh-agent, provide the matching public key. String
--ssh-port The target SSH port to use when you connect to this context (location). Integer 22
--ssh-username The username to use when you connect to this context (location). String

Synopsis

Copy
Copied!
            

nvwb create environment-variable variable value [options]

Description

Creates an environment variable in the currently open project, or a specified project. For more information, see Environment Variables.

Warning

You can’t run this command while the project container is running. Use status and stop to ensure the project container is stopped before you run this command.

variable is the name for the environment variable. variable can contain only letters, numbers, and underscores.

value is the value for the environment variable.

If you don’t specify variable or value, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list environment-variables to see the existing environment-variables before you run create environment-variable.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--description The description of the environment variable. String

Examples

To create a new environment variable, run the following code.

Copy
Copied!
            

nvwb create environment-variable MyVariable 123456 --description "a test variable"

You should see output similar to the following.

Copy
Copied!
            

VARIABLE | VALUE | DESCRIPTION -------------|--------|----------------- MyVariable | 123456 | a test variable

Synopsis

Copy
Copied!
            

nvwb connect integration [integration name [token|-]] [options]

Description

Connects an integration, such as GitHub or GitLab, and authorizes AI Workbench to make calls on behalf of the AI Workbench user. For more information, see AI Workbench Integrations.

Valid values for integration name include NGC, Github, Gitlab, and any custom integrations that you have created.

  • If you don’t specify integration name, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

  • If you only specify integration name, an OAuth2 authentication workflow starts and you log in to the integration.

  • If you specify integration token, the token is used for authentication.

  • If you specify integration -, the token is read from stdin.

Tip

Use list integrations to see the existing integrations before you run connect integration.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--no-browser, -n Do not automatically open the local web browser if doing an OAuth2 login for credentials.

Examples

To connect to GitHub, run the following code.

Copy
Copied!
            

nvwb connect integration Github

You should see output similar to the following.

Copy
Copied!
            

First, copy your one-time code: ####-#### Then, Open this URL in your browser: https://github.com/login/device NAME | DESCRIPTION | CREDENTIALS | CONNECTED -----------|----------------|-------------------------|----------- NGC | ngc.nvidia.com | container-registry | false Github | Github.com | git, container-registry | true Gitlab | Gitlab.com | git | false

Synopsis

Copy
Copied!
            

nvwb create mount [type] [target] [options]

Description

Creates a new mount for the currently open project, or a specified project. For more information, see AI Workbench Mounts.

This command only creates the definition of a mount. To configure what host directories are mounted when the project starts, use configure mounts.

type is the type of the mount. The following are the valid values:

  • PROJECT — The mount that defines where the project’s directory is mounted into the project container.

  • HOST — Mount a directory from the computer where the project is located into the project container.

  • VOLUME — Create a persistent volume in a project container for storing data that is not erased when a container is rebuilt.

  • TMP — Create a temporary directory in a project container that is reset each time the project starts.

Warning

If a project is deleted, or a mount is deleted, any data stored in a volume mount is also deleted.

target is the target directory in the project container where the mount data is mounted. Each mount target is unique, and must be an absolute path (starting with a ‘/’ character).

If you don’t specify a required option, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list mounts to see the existing mounts before you run create mount.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--description The description of the mount. String
--options Additional options for the mount. String

Synopsis

Copy
Copied!
            

nvwb create project [name] [options]

Description

Creates a new project in the currently open context (location), or a specified context. For more information, see AI Workbench Projects.

name is a unique name for the project. name is limited to 47 characters using [a-zA-Z0-9-_].

If you don’t specify a required option, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list projects to see the existing projects before you run create project.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--base-environment-id The ID for the base environment image. Use list bases with the --wide and --output json options to see the existing bases and get the ID for the base you want. Specify --base-environment-id or --base-url, but not both. String
--base-url The URL for a custom base environment image. Specify the URL in the format registry-name/image-or-repository-name:tag. Provide the registry even for Docker images. Specify --base-environment-id or --base-url, but not both. String
--description A description for the project. String
--projectPath The absolute path to the directory where the project should be created. Otherwise the project is created in the default directory. String

Examples

To create a new project, run the following code.

Copy
Copied!
            

nvwb create project "My Project 1" --description "Test project 1" --base-environment-id "eyJpbWFnZS..."

You should see output similar to the following.

Copy
Copied!
            

Created new project 'My-Project-1' (/home/workbench/nvidia-workbench/My-Project-1) ✓ Container build complete (26.074698246s)

Synopsis

Copy
Copied!
            

nvwb create secret [variable] [options]

Description

Creates a new secret variable for the currently open project, or a specified project. For more information, see Secrets (Sensitive Environment Variables).

This command only creates the definition of a secret variable. To set the value of a secret variable, use configure secrets.

Warning

You can’t run this command while the project container is running. Use status and stop to ensure the project container is stopped before you run this command.

variable is the name for the secret variable. variable can contain only letters, numbers, and underscores.

If you don’t specify variable, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list secrets to see the existing secrets before you run create secret.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--description The description of the secret variable. String

Examples

To create a secret variable named test2, run the following code.

Copy
Copied!
            

nvwb create secret test2 --description "Test var 2"

You should see output similar to the following.

Copy
Copied!
            

VARIABLE | DESCRIPTION | CONFIGURED -----------|-------------|------------ test1 | Test var 1 | true test2 | Test var 2 | false

Note

To set the value of test2, use configure secrets.

Synopsis

Copy
Copied!
            

nvwb deactivate [options]

Description

Deactivates the currently open context (location), or a specified context. For more information, see AI Workbench Locations.

If you don’t specify the --shutdown option, the context is no longer the default context for your terminal session, but the AI Workbench service and container runtimes remain running.

If you specify the --shutdown option, the AI Workbench service also stops.

Tip

Use list contexts to see the existing contexts before you run deactivate.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--force, -f Deactivate the context even if project apps are still running.
--shutdown Stop the workbench service, tunnels, and other resources for the currently open context (location), or a specified context.

Examples

To deactivate the current context (location), run the following code.

Copy
Copied!
            

nvwb deactivate

There is no output, but your command prompt changes to remove the context (location) name, similar to the following.

Copy
Copied!
            

(nvwb:local) workbench@computer:~$ workbench@computer:~$

Synopsis

Copy
Copied!
            

nvwb delete app [app-name] [options]

Description

Deletes an app from the currently open project, or a specified project. For more information, see AI Workbench Applications.

app-name is the name of the app to delete.

If you don’t specify app-name, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list apps to see the existing apps before you run delete app.

Options

This command accepts relevant global options.

Examples

To delete an app named test app from your project, run the following code.

Copy
Copied!
            

nvwb delete app "test app"

The output is a table of the apps that remain in the project.

Synopsis

Copy
Copied!
            

nvwb delete context [context_name] [options]

Description

Deletes information about an existing context (location). For more information, see AI Workbench Locations.

Note

This command deletes information about the context that is stored by AI Workbench locally. No data or information is deleted on the context itself.

context_name is the name of the location to delete.

If you don’t specify context_name, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list contexts to see the existing contexts before you run delete context.

Options

This command accepts relevant global options.

Synopsis

Copy
Copied!
            

nvwb delete environment-variable [variable] [options]

Description

Deletes an environment variable from the currently open project, or a specified project. For more information, see Environment Variables.

variable is the name of the environment variable to delete.

If you don’t specify variable, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list environment-variables to see the existing environment-variables before you run delete environment-variable.

Options

This command accepts relevant global options.

Examples

To delete an environment variable named MyVariable, run the following code.

Copy
Copied!
            

nvwb delete environment-variable MyVariable

The output is a table of the environment variables that remain in the project.

Synopsis

Copy
Copied!
            

nvwb delete integration [integration name] [options]

Description

Deletes an integration, such as GitHub or GitLab. For more information, see AI Workbench Integrations.

integration name is the name of the integration to delete.

If you don’t specify integration name, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list integrations to see the existing integrations before you run delete integration.

Options

This command accepts relevant global options.

Examples

To delete an integration named Custom Integration 1, run the following code.

Copy
Copied!
            

nvwb delete integration "Custom Integration 1"

The output is a table of the integrations that remain.

Synopsis

Copy
Copied!
            

nvwb delete mount [target] [options]

Description

Deletes a mount from the currently open project, or a specified project. For more information, see AI Workbench Mounts.

Warning

You can’t run this command while the project container is running. Use status and stop to ensure the project container is stopped before you run this command.

target is the target directory in the project container where the mount data is mounted.

Warning

If a mount is deleted, any data stored in a volume mount is also deleted.

If you don’t specify target, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list mounts to see the existing mounts before you run delete mount.

Options

This command accepts relevant global options.

Synopsis

Copy
Copied!
            

nvwb delete project [project_name or project_path] [options]

Description

Deletes a project from the currently open context (location), or a specified context. For more information, see AI Workbench Projects.

project_name is the name of the project to delete.

project_path is the absolute path of the project.

Note

The delete project command only deletes the copy of the project in the currently open context (location), or a specified context. This command does not delete the project from any Git servers that contain the project.

If you don’t specify a required option, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list projects to see the existing projects before you run delete project.

Options

This command accepts relevant global options.

Examples

To delete a project named hello-world, run the following code.

Copy
Copied!
            

nvwb delete project hello-world

The output is a table of the projects that remain.

Synopsis

Copy
Copied!
            

nvwb delete secret [variable] [options]

Description

Deletes a secret variable from the currently open project, or a specified project. For more information, see Secrets (Sensitive Environment Variables).

Warning

You can’t run this command while the project container is running. Use status and stop to ensure the project container is stopped before you run this command.

variable is the name of the secret variable to delete.

If you don’t specify variable, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list secrets to see the existing secrets before you run delete secret.

Options

This command accepts relevant global options.

Examples

To delete a secret variable named test2, run the following code.

Copy
Copied!
            

nvwb delete secret test2

The output is a table of the secret variables that remain.

Synopsis

Copy
Copied!
            

nvwb disconnect integration [integration name] [options]

Description

Disconnects an integration, such as GitHub or GitLab. For more information, see AI Workbench Integrations.

Valid values for integration name include NGC, Github, Gitlab, and any custom integrations that you have created. If you don’t specify integration name, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list integrations to see the existing integrations before you run disconnect integration.

Options

This command accepts relevant global options.

Examples

To disconnect your GitHub integration, run the following code.

Copy
Copied!
            

nvwb disconnect integration Github

You should see output similar to the following.

Copy
Copied!
            

NAME | DESCRIPTION | CREDENTIALS | CONNECTED -----------|----------------|-------------------------|----------- NGC | ngc.nvidia.com | container-registry | false Github | Github.com | git, container-registry | false Gitlab | Gitlab.com | git | false

Synopsis

Copy
Copied!
            

nvwb fetch [options]

Description

Fetches changes from your remote Git repository. For more information, see Git in AI Workbench.

Note

Before you can use CLI commands that perform Git actions, you must connect to your Git account from AI Workbench. For more information, see connect integration or Connect to Your Git Account and Other Integrations.

Options

This command accepts relevant global options.

Examples

To fetch changes from your remote Git repository, run the following code.

Copy
Copied!
            

nvwb fetch

You should see output similar to the following.

Copy
Copied!
            

✓ Project fetch complete (3.009665582s) Successfully fetched project 'hello-world'

Synopsis

Copy
Copied!
            

nvwb history [options]

Description

Shows the commit logs for the currently open project, or a specified project. For more information, see Git in AI Workbench.

Note

Before you can use CLI commands that perform Git actions, you must connect to your Git account from AI Workbench. For more information, see connect integration or Connect to Your Git Account and Other Integrations.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--number, -n The maximum number of commits to include in the output. Integer

Examples

To see the most recent commit for a project, run the following code.

Copy
Copied!
            

nvwb history --number=1

You should see output similar to the following.

Copy
Copied!
            

commit 17bd1938dc0a1a369618cc7ef76f0f084cb048e1 Author: Name <email@example.com> Date: 2024-09-04 12:52:46 UTC My commit message: important changes

Synopsis

See the Examples section.

Description

Installs AI Workbench and dependencies on the computer. You invoke the install command from outside the CLI. For more information, see Install AI Workbench.

You must run this command with admin privileges, and you can run the command in the following modes:

  • Interactive mode — Don’t specify any options. You are prompted for all options as the install occurs.

  • Non-interactive mode — Specify all required options.

If you run this command as root to install AI Workbench for another user, you must specify the --uid and --gid options.

After the installation completes, restart your shell session and then the nvwb command is available in your terminal.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--noninteractive Install AI Workbench in non-interactive mode. Required for non-interactive installation.
--accept, -a Accept the End User License Agreement for NVIDIA AI Workbench. Required for non-interactive installation.
--drivers Install NVIDIA GPU drivers. Required if you want to install drivers.
--docker Use Docker as your container runtime. One of --docker or --podman is required for non-interactive installation.
--podman Use Podman as your container runtime. Choose one of --docker or --podman. One of --docker or --podman is required for non-interactive installation.
--gid The group ID of the AI Workbench user. Required when you install AI Workbench for another user. Integer
--uid The user ID of the AI Workbench user. Required when you install AI Workbench for another user. Integer

Examples

To install AI Workbench on macOS or Linux, run the following code.

Copy
Copied!
            

sudo -E $HOME/.nvwb/bin/nvwb-cli install

To install AI Workbench on Windows, run the following code in Powershell or Terminal.

Copy
Copied!
            

wsl -d NVIDIA-Workbench -u root -- /home/workbench/.nvwb/bin/nvwb-cli install --uid 1000 --gid 1000

Synopsis

Copy
Copied!
            

nvwb list apps [options]

Description

List the applications available in the currently open project, or a specified project. For more information, see AI Workbench Applications.

Options

This command accepts relevant global options.

Examples

To list the apps available the current project, run the following code.

Copy
Copied!
            

nvwb list apps

You should see output similar to the following.

Copy
Copied!
            

NAME | TYPE | CLASS | RUN STATE ----------------|------------|--------|------------- simple-gradio | custom | webapp | ⚫ Stopped jupyterlab | jupyterlab | webapp | ⚫ Stopped

Synopsis

Copy
Copied!
            

nvwb list bases [options]

Description

Lists the available base environments. For more information, see Base Container Environments for AI Workbench Projects.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--wide For some list subcommands, not all data appears in the output. Use the --wide option to see all available data in the output. Include the --output json option if the output is too wide for the screen.

Examples

To see the available base environments, run the following code.

Copy
Copied!
            

nvwb list bases --wide --output json

You should see output similar to the following.

Copy
Copied!
            

{ "result": [ { "Id": "eyJpbWFnZSI6Im52aWRpYS9haS13b3JrYmVuY...", "SchemaVersion": "v2", "Name": "Python Basic", "Description": "A Python Base with Jupyterlab", "ImageVersion": "1.0.2", "BuildTimestamp": "20231114175838", "ContainerRegistry": "nvcr.io", "ContainerImage": "nvidia/ai-workbench/python-basic", "ContainerImageTag": "1.0.2", "CudaVersion": "", "Os": "linux", "OsDistro": "ubuntu", "OsDistroRelease": "22.04", "ProgrammingLanguages": [ "python3" ], ... more data ... } ] }

Synopsis

Copy
Copied!
            

nvwb list built-in-apps [options]

Description

Lists the built-in applications. For more information, see Built-in Apps.

Options

This command accepts relevant global options.

Examples

To list the built-in applications, run the following code.

Copy
Copied!
            

nvwb list built-in-apps

You should see output similar to the following.

Copy
Copied!
            

BUILT IN APPLICATION | APPLICATION TYPE | APPLICATION CLASS -----------------------|------------------|------------------- Jupyterlab | jupyterlab | webapp Visual Studio Code | vs-code | native

Synopsis

Copy
Copied!
            

nvwb list contexts [options]

Description

Lists the available contexts (locations). For more information, see AI Workbench Locations.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--wide For some list subcommands, not all data appears in the output. Use the --wide option to see all available data in the output. Include the --output json option if the output is too wide for the screen.

Examples

To list available contexts (locations), run the following code.

Copy
Copied!
            

nvwb list contexts

You should see output similar to the following.

Copy
Copied!
            

NAME | DESCRIPTION | HOSTNAME | STATUS --------|--------------------|-----------|------------ local | My Computer (name) | localhost | 🟢 Running

Synopsis

Copy
Copied!
            

nvwb list environment-variables [options]

Description

Lists the environment-variables defined in the currently open project, or a specified project. For more information, see Environment Variables.

Options

This command accepts relevant global options.

Examples

To list the environment variables in the current project, run the following code.

Copy
Copied!
            

nvwb list environment-variables

You should see output similar to the following.

Copy
Copied!
            

VARIABLE | VALUE | DESCRIPTION -------------|--------|----------------- MyVariable | 123456 | a test variable

Synopsis

Copy
Copied!
            

nvwb list integrations [options]

Description

Lists the available integrations. For more information, see AI Workbench Integrations.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--wide For some list subcommands, not all data appears in the output. Use the --wide option to see all available data in the output. Include the --output json option if the output is too wide for the screen.

Examples

To list available integrations, run the following code.

Copy
Copied!
            

nvwb list integrations

You should see output similar to the following.

Copy
Copied!
            

NAME | DESCRIPTION | CREDENTIALS | CONNECTED -----------|----------------|-------------------------|----------- NGC | ngc.nvidia.com | container-registry | false Github | Github.com | git, container-registry | true Gitlab | Gitlab.com | git | false

Synopsis

Copy
Copied!
            

nvwb list mounts [options]

Description

Lists the mounts defined for the currently open project, or a specified project. For more information, see AI Workbench Mounts.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--wide For some list subcommands, not all data appears in the output. Use the --wide option to see all available data in the output. Include the --output json option if the output is too wide for the screen.

Examples

To see the mounts in the current project, run the following code.

Copy
Copied!
            

nvwb list mounts --wide

You should see output similar to the following.

Copy
Copied!
            

All mounts are configured TYPE | TARGET | DESCRIPTION | CONFIGURED | SOURCE | OPTIONS ----------|-----------|-------------------|------------|--------------------|--------- PROJECT | /project/ | Project directory | true | (ProjectDirectory) | rw

Synopsis

Copy
Copied!
            

nvwb list packages [options]

Description

Lists the packages available in the currently open project, or a specified project. For more information, see Packages.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--package-manager, -m Filters the output to only packages managed by the specified package manager. String apt, pip

Examples

To see available packages for the pip package manager, run the following code.

Copy
Copied!
            

nvwb list packages -m pip

You should see output similar to the following.

Copy
Copied!
            

Package Manager: pip PACKAGE | VERSION SPECIFICATION(S) | INSTALLED IN BASE -------------|--------------------------|------------------- jupyterlab | >3.0 | false numpy | | false

Synopsis

Copy
Copied!
            

nvwb list projects [options]

Description

Lists the projects available in the currently open context (location), or a specified context. For more information, see AI Workbench Projects.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--wide For some list subcommands, not all data appears in the output. Use the --wide option to see all available data in the output. Include the --output json option if the output is too wide for the screen.

Examples

To list the projects in the active context, run the following code.

Copy
Copied!
            

nvwb list projects

You should see output similar to the following.

Copy
Copied!
            

NAME | DESCRIPTION | CONTAINER | APPS --------------|------------------------------|-------------|---------------- hello-world | A simple hello world project | ⚫ Stopped | ⚫ jupyterlab

Synopsis

Copy
Copied!
            

nvwb list resources [options]

Description

Lists the hardware resources requested by the currently open project, or a specified project. For more information, see Hardware.

Options

This command accepts relevant global options.

Examples

To list the hardware requested by the current project, run the following code.

Copy
Copied!
            

nvwb list resources

You should see output similar to the following.

Copy
Copied!
            

GPUs Requesed: 4 Shared Memory in MB: 0

Synopsis

Copy
Copied!
            

nvwb list secrets [options]

Description

Lists the secrets in the currently open project, or a specified project. For more information, see Secrets (Sensitive Environment Variables).

Tip

For some list commands, not all data appears in the output. Use the --wide option to see all available data in the output. Use the --output json option if the output is too wide for the screen.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--wide Include all available columns in the output.

Examples

To list the secrets in the current project, run the following code.

Copy
Copied!
            

nvwb list secrets

You should see output similar to the following.

Copy
Copied!
            

1 secrets(s) are unconfigured VARIABLE | DESCRIPTION | CONFIGURED -----------|-------------|------------ test1 | Test var 1 | true test2 | Test var 2 | false

Synopsis

Copy
Copied!
            

nvwb open [project_name or project_path] [options]

Description

Opens a project in the currently open context (location), or a specified context. For more information, see AI Workbench Projects.

If you don’t specify project_name, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

If you specify project_path, you must provide an absolute path.

After you open a project, all subsequent CLI commands use the project by default, so you don’t need to specify the --project option.

Tip

Use list projects to see the existing projects before you run open.

Options

This command accepts relevant global options.

Examples

To open a project in the current context (location), run the following code.

Copy
Copied!
            

nvwb open hello-world

There is no output, but your command prompt changes to include the project name, similar to the following.

Copy
Copied!
            

(nvwb:local) workbench@computer:~$ (nvwb:local/hello-world) workbench@computer:~/nvidia-workbench/hello-world$

Synopsis

Copy
Copied!
            

nvwb publish <remote-server-url> <namespace> <visibility> [options]

Description

Pushes the currently open project, or a specified project to your Git server for the first time. After you publish successfully one time, use push in the future. For more information, see Git in AI Workbench.

remote-server-url is the Git server base URL, including the protocol, such as https://github.com.

namespace is the namespace on the Git server where the repository is created. This might be your personal account name, or an organization or team that you belong to.

visibility is the visibility setting for the repository on the Git server. Valid values are public and private. For self-hosted Git servers, internal is also valid.

If you don’t specify remote-server-url or namespace, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Note

Before you can use CLI commands that perform Git actions, you must connect to your Git account from AI Workbench. For more information, see connect integration or Connect to Your Git Account and Other Integrations.

Options

This command accepts relevant global options.

Examples

To publish your project to your Git server, run the following code.

Copy
Copied!
            

nvwb publish https://github.com <git namespace> private

You should see output similar to the following.

Copy
Copied!
            

Publishing project, please wait... ✓ Project Push complete (4.011624462s) Successfully published project to https://github.com/namespace/hello-world.git

Synopsis

Copy
Copied!
            

nvwb pull [options]

Description

Pulls changes from your remote Git repository into the currently open project, or a specified project. For more information, see Git in AI Workbench.

If you have uncommitted changes in your project, you must commit the changes before you can pull.

Note

Before you can use CLI commands that perform Git actions, you must connect to your Git account from AI Workbench. For more information, see connect integration or Connect to Your Git Account and Other Integrations.

Options

This command accepts relevant global options.

Examples

To pull changes from your remote Git repository into your project, run the following code.

Copy
Copied!
            

nvwb pull

You should see output similar to the following.

Copy
Copied!
            

✓ Project Pull complete (4.005346608s) Successfully pulled project 'hello-world'

Synopsis

Copy
Copied!
            

nvwb push [options]

Description

Pushes changes to your remote Git repository from the currently open project, or a specified project. The first time you push changes, use publish instead. For more information, see Git in AI Workbench.

Note

Before you can use CLI commands that perform Git actions, you must connect to your Git account from AI Workbench. For more information, see connect integration or Connect to Your Git Account and Other Integrations.

Options

This command accepts relevant global options.

Examples

To push project changes to your remote Git repository, run the following code.

Copy
Copied!
            

nvwb push

You should see output similar to the following.

Copy
Copied!
            

✓ Project Push complete (3.010268434s) Successfully Pushed project 'hello-world'

Synopsis

Copy
Copied!
            

nvwb remove package [package-manager] [package-reference] [options]

Description

Removes one or more packages from the currently open project, or a specified project. For more information, see Packages.

package-manager is the name of the package manager, such as apt or pip, that should remove the specified package. Package managers are configured in the project’s base environment.

package-reference is the name of the package to remove, or the package name and version information. You can specify multiple packages separated by a space for the same package manager.

If you don’t specify package-manager or package-reference, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list packages to see the existing packages before you run remove package.

Options

This command accepts relevant global options.

Examples

To remove a package, for example NumPy, run the following code.

Copy
Copied!
            

nvwb remove package pip numpy

You should see output similar to the following.

Copy
Copied!
            

✓ Remove package(s) complete (6.009000228s)

Synopsis

Copy
Copied!
            

nvwb start [app_name] [options]

Description

Starts an application from the currently open project, or a specified project. If the project’s container is not running, it is started automatically. For more information, see AI Workbench Applications.

If you don’t specify an app name, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

If the application is a web app, such as Jupyterlab, the application opens in your default web browser.

Tip

Use list apps to see the existing apps before you run start.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--container Start the project container, but do not start any apps.
--no-browser, -n Starts the app, but does not open a web browser.
--no-gpus, -g Start the app without GPUs. Use this option when you want to start an app that requires GPUs, and GPUs are not available on your computer.
--timeout The number of seconds to wait for the application to start and become reachable before an error occurs. Integer 5

Examples

To start a specific app, for example JupyterLab run the following code.

Copy
Copied!
            

nvwb start jupyterlab

You should see output similar to the following.

Copy
Copied!
            

✅ Container is running ✅ jupyterlab is running App successfully started and available at: http://localhost:10000/projects/test-1/applications/jupyterlab/?token=<token>

To start the project container, but not start any apps, run the following code.

Copy
Copied!
            

nvwb start --container

Synopsis

Copy
Copied!
            

nvwb status [options]

Description

Gets the status of the currently open project, or a specified project. Information includes the name, path, description, and status of the environment, container, apps, and Git repository. For more information, see AI Workbench Projects.

Options

This command accepts relevant global options.

Examples

To get the status of a project, run the following code.

Copy
Copied!
            

nvwb status

You should see output similar to the following.

Copy
Copied!
            

• Name: hello-world (/home/workbench/nvidia-workbench/hello-world) • Description: Test project • Environment: 🟢 No Build Required • Container: ⚫ Stopped • Applications: • jupyterlab: ⚫ Stopped • Local Repository: 1 🟡 Modified

Synopsis

Copy
Copied!
            

nvwb stop [app_name] [options]

Description

Stops an application running in the currently open project, or a specified project. For more information, see AI Workbench Applications.

If you don’t specify an app name, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

If you don’t specify an app name, and you use the --container option, all apps and the container are stopped.

After a specified app stops, if no other apps are running, the container is also stopped. If other apps are still running, the container continues running. To force the container to stop, even if other apps are still running, use the --container option.

Tip

Use status to see the running apps before you run stop.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--container After stopping any apps, also stop the project container.

Examples

To stop a specific app, for example JupyterLab run the following code.

Copy
Copied!
            

nvwb stop jupyterlab

To stop all apps and the container, run the following code.

Copy
Copied!
            

nvwb stop --container

Synopsis

Copy
Copied!
            

nvwb support create-bundle [archive_name.zip] [options]

Description

Creates a zip file that contains log files, configuration information, and system state for your AI Workbench installation. For more information, see Create a Support Bundle for Troubleshooting.

If you don’t specify a name for the zip file, the default file name is ~/.nvwb/ai-workbench-support-bundle.zip.

Options

This command accepts relevant global options.

Examples

To create a support bundle, run the following code.

Copy
Copied!
            

nvwb support create-bundle

You should see output similar to the following.

Copy
Copied!
            

Support bundle created at '/home/workbench/.nvwb/ai-workbench-support-bundle.zip'

To create a support bundle for a different context (location), run the following code.

Copy
Copied!
            

nvwb support create-bundle --context <context name>

Synopsis

Copy
Copied!
            

nvwb uninstall [options]

Description

Uninstalls AI Workbench and managed dependencies from the computer. After the uninstall completes, a message appears that indicates if there are any additional steps to perform. For more information, see Install AI Workbench.

You must run this command with admin privileges.

If you run this command as root to uninstall AI Workbench for another user, you must specify the --uid and --gid options.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--confirm Run the command without prompting for confirmation.
--gid The group ID of the AI Workbench user. Required when you uninstall AI Workbench for another user. Integer 20
--uid The user ID of the AI Workbench user. Required when you uninstall AI Workbench for another user. Integer 502

Examples

To uninstall AI Workbench on macOS or Linux, run the following code.

Copy
Copied!
            

sudo -E $HOME/.nvwb/bin/nvwb-cli uninstall

To uninstall AI Workbench on Windows, run the following code in Powershell or Terminal.

Copy
Copied!
            

wsl -d NVIDIA-Workbench -u root -- /home/workbench/.nvwb/bin/nvwb-cli uninstall --uid 1000 --gid 1000

Synopsis

Copy
Copied!
            

nvwb update base [options]

Description

Updates the base environment of the currently open project, or a specified project to the latest version. For more information, see Base Container Environments for AI Workbench Projects.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--yes, -y Accept the update without prompting.

Examples

To update the base of the open project, run the following code.

Copy
Copied!
            

nvwb update base

If your project base is already current, you should see output similar to the following.

Copy
Copied!
            

Project base environment is already at the latest tag.

Synopsis

Copy
Copied!
            

nvwb update context [context_name] [options]

Description

Updates a context (location). For more information, see AI Workbench Locations.

Warning

You can’t run this command while the context is active. Use deactivate with the --shutdown option to ensure the context is stopped before you run this command.

context_name is the name of the context to update. You can’t update the name of a context. For the local context, you can only update the description.

If you don’t specify a required option, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list contexts to see the existing contexts before you run update context.

Options

This command accepts relevant global options, and the following additional options.

Option

Description

Type

Default Value

Valid Values

--accept-ssh-fingerprints Accept the SSH fingerprints for the context (location).
--context-workbench-dir The internal workbench directory where the workbench service stores configuration and internal data. For most installations this is /home/<username>/.nvwb, which is the default directory. String
--description, -d A description for the context (location). String
--hostname The hostname or IP address for the context (location). You can’t change a remote context to a local context by setting the hostname to localhost. You can’t change a local context to a remote context by setting the hostname to something other than localhost. String
--proxy-port The port for the traffic proxy. The port can’t be assigned to an existing context. Integer 1024 or greater
--service-port The port for the workbench service proxy. The port can’t be assigned to an existing context. Integer 1024 or greater
--ssh-key-path The path to the SSH key to use when you connect to this context (location). For keys held by ssh-agent, provide the matching public key. String
--ssh-port The target SSH port to use when you connect to this context (location). The port can’t be assigned to an existing context. Integer 22
--ssh-username The username to use when you connect to this context (location). String

Examples

To update the description of the local context, run the following code.

Copy
Copied!
            

nvwb update context local --description "My Computer Work Laptop"

You should see output similar to the following.

Copy
Copied!
            

• Name: local • Description: My Computer Work Laptop • Hostname: localhost • Workbench Directory: /home/workbench/.nvwb • SSH Key Path: • SSH Username: • SSH Port: • SSH Fingerprint: • Proxy Port: 10000 • Service Port: 10001

Synopsis

Copy
Copied!
            

nvwb update integration [options]

Description

Updates an integration, such as GitHub or GitLab. For more information, see AI Workbench Integrations.

When you run this command, an interactive prompt appears, and you can type and use the arrow keys to make your selections. If you want to update an integration without using the interactive interface, edit the JSON configuration file for the integration at ~/.nvwb/ or C:\Users\<username>\AppData\Local\NVIDIA Corporation\AI Workbench\.

Tip

Use list integrations to see the existing integrations before you run update integration.

Options

This command accepts relevant global options.

Examples

To update an integration, run the following code.

Copy
Copied!
            

nvwb update integration

An interactive prompt appears. When you are done updating the integration, you should see output similar to the following.

Copy
Copied!
            

NAME | DESCRIPTION | CREDENTIALS | CONNECTED -----------|----------------|-------------------------|----------- NGC | ngc.nvidia.com | container-registry | false Github | Github.com | git, container-registry | true Gitlab | Gitlab.com | git | false

Synopsis

Copy
Copied!
            

nvwb update resources [resource-type1:value1] [resource-type2:value2] [options]

Description

Updates the hardware resources that are requested by the currently open project, or a specified project. For more information, see Hardware.

Warning

You can’t run this command while the project container is running. Use status and stop to ensure the project container is stopped before you run this command.

Specify resource-type:value, where resource-type is the type of resource requested and value is the new value requested for the resource. Valid values for resource-type are gpus and shared-memory. You can specify more than one resource-type:value separated by spaces.

If you don’t specify resource-type:value, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Tip

Use list resources to see the existing resource requests before you run update resources.

Options

This command accepts relevant global options.

Examples

To request 2 GPUs for your project, run the following code.

Copy
Copied!
            

nvwb update resources gpus:2

You should see output similar to the following.

Copy
Copied!
            

Project resources updated GPUs Requesed: 2 Shared Memory in MB: 0

Synopsis

Copy
Copied!
            

nvwb update script [script-name] [options]

Description

Edits a build script for the currently open project, or a specified project. For more information, see Scripts.

script-name is one of preBuild.bash, preLanguage.bash, or postBuild.bash.

If you don’t specify script-name, an interactive prompt appears, and you can type and use the arrow keys to make your selections.

Options

This command accepts relevant global options.

Examples

To edit the pre-build script for your project, run the following code.

Copy
Copied!
            

nvwb update script preBuild.bash

The editor opens and you can make changes to the file, and then save and close the file.

You should see output similar to the following.

Copy
Copied!
            

Successfully edited preBuild.bash

Synopsis

Copy
Copied!
            

nvwb version [options]

Description

Returns the version of the AI Workbench CLI installed on the computer. For more information, see Release Notes.

Options

This command accepts relevant global options.

Examples

To get the version of the AI Workbench CLI installed on the computer, run the following code.

Copy
Copied!
            

nvwb version --output json

You should see output similar to the following.

Copy
Copied!
            

{ "result": { "CLIVersion": "0.29.2", "Channel": "stable", "BuildTime": "Thu Aug 15 00:27:32 UTC 2024", "OS": "linux", "Arch": "amd64", "GolangVersion": "go1.21.11" } }

Previous Reverse Proxy and Networking
Next Release Notes
© Copyright © 2024, NVIDIA Corporation. Last updated on Sep 17, 2024.