diff --git a/docs/Researcher/cli-reference/new-cli/runai.md b/docs/Researcher/cli-reference/new-cli/runai.md index 2dc35bb703..401dfba176 100644 --- a/docs/Researcher/cli-reference/new-cli/runai.md +++ b/docs/Researcher/cli-reference/new-cli/runai.md @@ -6,6 +6,8 @@ authors: date: 2024-Jun-18 --- +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. + ## The new Command-line interface This command-line interface is a complete revamp of the command-line interface. Few highlights: @@ -15,119 +17,7 @@ This command-line interface is a complete revamp of the command-line interface. * The CLI is only available for Run:ai cluster version 2.18 and up. * The new CLI is backward compatible with the older CLI. -## 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. - -``` -runai [flags] -``` ## 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: - -1. Press the *Help* icon, then select *Researcher Command Line Interface*. -2. From the dropdown, select a cluster. -3. Select your operating system. -4. Copy the installer command to your clipboard, then paste it into a terminal window and run the command. -5. 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: - -```zsh -autoload -U compinit; compinit -i -source <(runai completion zsh) -``` - -* 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: - -```bash -[[ -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 ` - -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=` - -If successful the following message will return: - -`project 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](runai_cluster.md)—cluster management -* [runai config](runai_config.md)—configuration management -* [runai list](runai_list.md)—[Deprecated] display resource list. By default displays the job list -* [runai login](runai_login.md)—login to the control plane -* [runai logout](runai_logout.md)—logout from control plane -* [runai node](runai_node.md)—node management -* [runai nodepool](runai_nodepool.md)—node pool management -* [runai project](runai_project.md)—project management -* [runai report](runai_report.md)—report management -* [runai training](runai_training.md)—training management -* [runai upgrade](runai_upgrade.md)—upgrades the CLI to the latest version -* [runai version](runai_version.md)—print version information -* [runai workload](runai_workload.md)—workload management -* [runai workspace](runai_workspace.md)—workspace management +See installation instructions [here](../../../admin/researcher-setup/new-cli-install.md). \ No newline at end of file diff --git a/docs/admin/researcher-setup/new-cli-install.md b/docs/admin/researcher-setup/new-cli-install.md new file mode 100644 index 0000000000..a27b534cf6 --- /dev/null +++ b/docs/admin/researcher-setup/new-cli-install.md @@ -0,0 +1,93 @@ +# Installing the New Command-line interface + +This article explains the procedure for installing and configuring the __new__ researcher Command Line Interface (CLI). + +!!! Important + This document refers to the new CLI which only works with clusters of version 2.18 and up. + The installation instructions for the older CLI are [here](cli-install.md). + + +## Enabling the new CLI + +Under **Tools & Settings** → General settings → Workloads, enable the flag `Improved command line interface` + +## Installing the CLI + +1. Click the **Help (?)** icon in the top right corner +2. Select **Researcher Command Line Interface** +3. Select the **cluster** you want the CLI to communicate with +4. Select your computer’s **operating system** +5. Copy the installer command and run it in the terminal +6. Follow the installation process instructions +7. Click `Enter` to use the default values (recommended) + +### Testing the installation + +To verify the CLI client was installed properly + +1. Open the terminal +2. Run the command `runai version` + +## Configuring the CLI + +Follow the steps below to configure the CLI. + +### Authenticating the CLI + +After installation, sign in to the Run:ai platform to authenticate the CLI: + +1. Open the terminal on your local machine. +2. Run `runai login`. +3. Enter your username and password on the Run:ai platform's sign-in page. +4. Return to the terminal window to use the CLI. + +### Setting the default cluster + +If only one cluster is connected to the account, it is set as the default cluster when you first sign in. + If there are multiple clusters, you must follow the steps below to set your preferred cluster for workload submission: + +1. Open the terminal on your local machine. +2. Run `runai cluster list` to find the required cluster name. +3. Run the following command `runai cluster set --name ` + +### Setting a default project + +Set a default working project, to easily submit workloads without mentioning the project name in every command. + +1. Run the following command on the terminal: + `runai project set --name=` +2. If successful, the following message is returned: + `project configured successfully` +3. To see the current configuration run: + `runai config generate --json` + +### Installing command auto-completion + +Auto-completion assists with completing the command syntax automatically for ease of use. Auto-completion is installed automatically. + The interfaces below require manual installation: + +__Installation instructions for ZSH__ + +1. Edit the file `~/.zshrc` +2. Add the following code: + +``` bash +autoload -U compinit; compinit -i +source <(runai completion zsh) +``` + +__Installation instructions for Bash__ + +1. Install the bash-completion package +2. Choose your operating system: + Mac: `brew install bash-completion` + Ubuntu/Debian: `sudo apt-get install bash-completion` + Fedora/Centos: `sudo yum install bash-completion` +3. Edit the file `~/.bashrc` and add the following lines: + +``` bash +[[ -r “/usr/local/etc/profile.d/bash_completion.sh” ]] && . “/usr/local/etc/profile.d/bash_completion.sh” + +source <(runai completion bash) +``` + diff --git a/mkdocs.yml b/mkdocs.yml index 6e04dad211..282258e9d3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -178,6 +178,7 @@ nav: - 'Researcher Setup' : - 'Introduction' : 'admin/researcher-setup/researcher-setup-intro.md' - 'Install the CLI' : 'admin/researcher-setup/cli-install.md' + - 'Install the New CLI' : 'admin/researcher-setup/new-cli-install.md' - 'Configuration' : - 'Overview' : 'admin/runai-setup/config/overview.md' - 'Set Node Roles' : 'admin/runai-setup/config/node-roles.md'