Running Applications with CLI

  • You can start, stop and configure applications installed in the Project container using the CLI.

  • Web applications will be proxied back to your local browser, even if the container is running on a remote Location.

  • You can also attach your terminal to the Project container or directly to the remote host.

Assumptions for these instructions

  • Your terminal is in an open Project

Listing Configured Applications

There are a few different ways to see the applications that are installed and configured in a Workbench Project.

  1. Inside an Active context, running nvwb list projects lists the installed and configured applications for each project. This option is easiest to see things at a glance.

  2. Examine the Project Spec file (.project/spec.yaml) under apps. This option is best for editing the configurations set for an application.

What can go wrong:

  • If editing the Spec file, the container may need to be rebuilt and apps restarted for changes to take effect.

Getting the Project Status

Run the following command and the set of applications configured in the Project will list:

Copy
Copied!
            

nvwb status

Example Output:

The output below shows that only JupyterLab and Tensorboard are configured and that neither is running.

Copy
Copied!
            

(nvwb:local/example-gpu-project) workbench@NV-2G4NGG3:~/nvidia-workbench/example-gpu-project$ nvwb status • Name: example-gpu-project (/home/workbench/nvidia-workbench/example-gpu-project) • Description: using it for the docs. • Environment: 🟢 No Build Required • Container: ⚫ Stopped • Applications: • jupyterlab: ⚫ Stopped • tensorboard: ⚫ Stopped • Local Repository: 3 🟡 Modified

What can go wrong:

  • The set of things that can go wrong when you run nvwb status, e.g. your terminal isn’t in an open Project or you are querying the status of a Project on a Git server that you don’t have access to.

Starting a Configured Application

See the section below on Starting a Configured Application.

The spec.yaml File

Configured applications are listed in the execution:apps section in the Project specification file. See the section below on Configuration of an Application in More Topics.

Starting a Configured Application

Run the following command to start the desired application, app_name with the flags. If the optional argument and flags are left off, then you will see a list of configured applications that you can select and start with Return.

Copy
Copied!
            

nvwb start [app_name] [flags]

Example Output:

Copy
Copied!
            

(nvwb:local/example-gpu-project) workbench@NV-2G4NGG3:~/nvidia-workbench/example-gpu-project$ nvwb start ? Select an app to start [Use arrows to move, type to filter] > jupyterlab tensorboard

What can go wrong:

  • The application is not properly configured.

  • The container was not built properly.

  • The application requires a GPU and none is available. You can fix this by setting the --no-gpus flag.

Stopping a Configured Application

Run the following command to stop the desired application, app_name. If the optional argument is left off, then you will see a list of configured applications that you can select and stop with Return.

Copy
Copied!
            

nvwb stop [app_name]

Example Output:

Copy
Copied!
            

(nvwb:local/example-gpu-project) workbench@NV-2G4NGG3:~/nvidia-workbench/example-gpu-project$ nvwb stop ? Select a running app to stop [Use arrows to move, type to filter] > jupyterlab tensorboard

What can go wrong:

  • NA

Attaching to the Running Project Container or the Remote System

Run the following command, where the --host flag will create an SSH connection directly onto the host machine. Leaving it out will attach your terminal to the container.

Copy
Copied!
            

nvwb attach [--host]

What can go wrong:

  • The Project Container isn’t running

Previous Developing Projects in CLI
Next Quickstart in CLI
© Copyright 2023-2024, NVIDIA. Last updated on Jan 21, 2024.