Introduction
Summary¶
The Run:ai Command-line Interface (CLI) tool for a Researcher to send deep learning workloads, acquire GPU-based containers, list jobs, and access other features in the Run:ai platform.
Installing the Improved Command Line Interface¶
Note
- Make sure the flag for the enhanced command line interface is enabled. To enable the Improved Command Line Interface Press the Tools and Settings icon, then General, then Workloads, then enable the Improved Command Line Interface toggle.
- Only clusters that are version 2.18 or later are supported.
To install the Improved Command Line Interface:
- Press the Help icon, then select Researcher Command Line Interface.
- From the dropdown, select a cluster.
- Select your operating system.
- Copy the installer command to your clipboard, then paste it into a terminal window and run the command.
- Follow the instruction prompts during the installation process. Press
Enter
to use the default values (recommended).
Install Command Auto-Completion¶
Auto-completion is installed automatically.
To install it manually:
- For ZSH, edit the file
~/.zshrc
and add the following lines:
-
For bash, install the bash-completion package. Choose your operating system:
-
Mac:
brew install bash-completion
- Ubuntu/Debian:
sudo apt-get install bash-completion
- Fedora/Centos:
sudo yum install bash-completion
Then, edit the file ~/.bashrc
and add the following lines:
[[ -r “/usr/local/etc/profile.d/bash_completion.sh” ]] && . “/usr/local/etc/profile.d/bash_completion.sh”
source <(runai completion bash)
Authenticating your CLI¶
After you have configured your shell, you will need to login to authenticate the CLI. In your terminal widow run:
runai login
You will be redirected to your platform's login page. Enter your user name and password and login.
You can then return to the terminal window to use the CLI.
Set the default cluster¶
When you only have one cluster connected to the tenant, it will be set as default cluster when you first login.
When there are multiple clusters, you can select the cluster you want to set as default by running the following:
runai cluster set --name <CLUSTER NAME>
To find the desired cluster name run:
runai cluster list
Set a default project¶
Recommendation
Setting a default working project to, allows you to easily submit workloads without mentioning the project name in every command.
runai project set --name=<project_name>
If successful the following message will return:
project <project name> configured successfully
To see the current configuration run:
runai config generate --json
Options¶
You can use the following configuration options with your CLI to customize your CLI.
--config-file string config file name; can be set by environment variable RUNAI_CLI_CONFIG_FILE (default "config.json")
--config-path string config path; can be set by environment variable RUNAI_CLI_CONFIG_PATH (default "~/.runai/")
-d, --debug enable debug mode
-h, --help help for runai
-v, --verbose enable verbose mode
See Also¶
- runai cluster—cluster management
- runai config—configuration management
- runai list—[Deprecated] display resource list. By default displays the job list
- runai login—login to the control plane
- runai logout—logout from control plane
- runai node—node management
- runai nodepool—node pool management
- runai project—project management
- runai report—report management
- runai training—training management
- runai upgrade—upgrades the CLI to the latest version
- runai version—print version information
- runai workload—workload management
- runai workspace—workspace management