CLI Commands Examples

This section provides examples of popular use cases illustrating how to use the Command Line Interface (CLI).

Logging in

Logging In via NVIDIA Run:ai Sign In Page (Web)

You can log in from the UI, if you are using SSO or credentials

runai login

Logging In via Terminal (Credentials)

runai login user -u [email protected] -p "password"

Configuration

Setting a Default Project

runai project set "project-name"

Submitting a Workload

Naming a Workload

Use the commands below to provide a name for a workload.

Setting the Workload Name ( my_workload_name)

Setting a Random Name with Prefix (prefix=workload type)

Setting a Random Name with Specific Prefix (prefix determined by flag)

Labels and Annotations

Labels

Annotations

Container's Environment Variables

Requests and Limits

Submitting and Attaching to Process

Submitting a Jupyter Notebook

Submitting Distributed Training Workload with TensorFlow

Submitting a Multi-Pod Workload

Submit and Bash

Submitting a Workload with Bash Command

Bashing into the Workload

Submitting Distributed Training Workload with MPI

Submitting with PVC

New PVC Bounded to the Workspace

New PVCs will be deleted when the workload is deleted

New Ephemeral PVC

New ephemeral PVCs will be deleted when the workload is deleted or paused

Existing PVC

Existing PVCs will not be deleted when the workload is deleted

Master/Worker Configuration

--command flag and -- are set both leader (master) and workers command/arguments

--master-args flag sets the master arguments

--master-command flag sets the master commands with arguments

--master-args and --master-command flags can be set together

Overriding Both the Leader (Master) and Worker Image's Arguments

Overriding Both the Leader (master) and Worker Image's Commands with Arguments

Overriding Arguments of the Leader (Master) and Worker Image's Arguments with Different Values

Overriding Command with Arguments of the Leader (Master) and Worker Image's Arguments

Listing Objects

Submitting with Clean Pod Policy

Submitting a distributed workload with a policy to clean:

Listing all Workloads in the User's Scope

Listing Projects in a YAML Format

Listing Nodes in a JSON Format

CLI Reference

For the full guide of the CLI syntax, see the CLI reference.

Last updated