Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into v2.18-RUN-17656-Wor…
Browse files Browse the repository at this point in the history
…kload-Policy-Yaml-Documentation
  • Loading branch information
jasonnovichRunAI committed Jul 4, 2024
2 parents 14540b9 + 1420f44 commit c65453e
Show file tree
Hide file tree
Showing 77 changed files with 2,448 additions and 153 deletions.
File renamed without changes.
7 changes: 3 additions & 4 deletions docs/Researcher/Walkthroughs/quickstart-inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ To complete this Quickstart you must have:

### Run an Inference Workload

* In the Run:ai user interface go to `Deployments`. If you do not see the `Deployments` section you may not have the required access control, or the inference module is disabled.
* Select `New Deployment` on the top right.
* In the Run:ai user interface go to `Inference`. If you do not see the `Inference` section you may not have the required access control, or the inference module is disabled.
* Select `New workload` -> `Inference` on the top right.
* Select `team-a` as a project and add an arbitrary name. Use the image `gcr.io/run-ai-demo/example-triton-server`.
* Under `Resources` add 0.5 GPUs.
* Under `Autoscaling` select a minimum of 1, a maximum of 2. Use the `concurrency` autoscaling threshold method. Add a threshold of 3.
* Add a `Container port` of `8000`.

This would start an inference workload for team-a with an allocation of a single GPU. Follow up on the Job's progress using the [Deployment list](../../admin/admin-ui-setup/deployments.md) in the user interface or by running `runai list jobs`
This would start an inference workload for team-a with an allocation of a single GPU.

### Query the Inference Server

Expand Down Expand Up @@ -63,4 +63,3 @@ Use the user interface to delete the workload.
## See also

* You can also create Inference deployments via API. For more information see [Submitting Workloads via YAML](../../developer/cluster-api/submit-yaml.md).
* See [Deployment](../../admin/admin-ui-setup/deployments.md) user interface.
124 changes: 124 additions & 0 deletions docs/Researcher/cli-reference/new-cli/runai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
title: Run:ai Enhanced Command-line Interface
summary: This article is the summary article for the CLI V2.
authors:
- Jason Novich
date: 2024-Jun-18
---

## 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 <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](runai_cluster.md)&mdash;cluster management
* [runai config](runai_config.md)&mdash;configuration management
* [runai list](runai_list.md)&mdash;[Deprecated] display resource list. By default displays the job list
* [runai login](runai_login.md)&mdash;login to the control plane
* [runai logout](runai_logout.md)&mdash;logout from control plane
* [runai node](runai_node.md)&mdash;node management
* [runai nodepool](runai_nodepool.md)&mdash;node pool management
* [runai project](runai_project.md)&mdash;project management
* [runai report](runai_report.md)&mdash;report management
* [runai training](runai_training.md)&mdash;training management
* [runai upgrade](runai_upgrade.md)&mdash;upgrades the CLI to the latest version
* [runai version](runai_version.md)&mdash;print version information
* [runai workload](runai_workload.md)&mdash;workload management
* [runai workspace](runai_workspace.md)&mdash;workspace management
30 changes: 30 additions & 0 deletions docs/Researcher/cli-reference/new-cli/runai_cluster.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## runai cluster

cluster management

```
runai cluster [flags]
```

### Options

```
-h, --help help for cluster
--interactive enable set interactive mode (enabled|disabled)
```

### Options inherited from parent commands

```
--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
-v, --verbose enable verbose mode
```

### SEE ALSO

* [runai](runai.md) - Run:ai Command-line Interface
* [runai cluster list](runai_cluster_list.md) - cluster list command
* [runai cluster set](runai_cluster_set.md) - set cluster context

30 changes: 30 additions & 0 deletions docs/Researcher/cli-reference/new-cli/runai_cluster_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## runai cluster list

cluster list command

```
runai cluster list [flags]
```

### Options

```
-h, --help help for list
--json Output structure JSON
--table Output structure table
--yaml Output structure YAML
```

### Options inherited from parent commands

```
--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
-v, --verbose enable verbose mode
```

### SEE ALSO

* [runai cluster](runai_cluster.md) - cluster management

29 changes: 29 additions & 0 deletions docs/Researcher/cli-reference/new-cli/runai_cluster_set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## runai cluster set

set cluster context

```
runai cluster set [flags]
```

### Options

```
-h, --help help for set
--id string set by cluster ID
--name string set by cluster name
```

### Options inherited from parent commands

```
--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
-v, --verbose enable verbose mode
```

### SEE ALSO

* [runai cluster](runai_cluster.md) - cluster management

30 changes: 30 additions & 0 deletions docs/Researcher/cli-reference/new-cli/runai_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## runai config

configuration management

```
runai config [flags]
```

### Options

```
-h, --help help for config
--interactive enable set interactive mode (enabled|disabled)
```

### Options inherited from parent commands

```
--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
-v, --verbose enable verbose mode
```

### SEE ALSO

* [runai](runai.md) - Run:ai Command-line Interface
* [runai config generate](runai_config_generate.md) - generate config file
* [runai config set](runai_config_set.md) - Set configuration values

30 changes: 30 additions & 0 deletions docs/Researcher/cli-reference/new-cli/runai_config_generate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## runai config generate

generate config file

```
runai config generate [flags]
```

### Options

```
--file string Output structure to file
-h, --help help for generate
--json Output structure JSON
--yaml Output structure YAML
```

### Options inherited from parent commands

```
--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
-v, --verbose enable verbose mode
```

### SEE ALSO

* [runai config](runai_config.md) - configuration management

31 changes: 31 additions & 0 deletions docs/Researcher/cli-reference/new-cli/runai_config_set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## runai config set

Set configuration values

```
runai config set [flags]
```

### Options

```
--auth-url string set the authorization URL
--cp-url string set the control plane URL
-h, --help help for set
--interactive enable set interactive mode (enabled|disabled)
--output string set the default output type
```

### Options inherited from parent commands

```
--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
-v, --verbose enable verbose mode
```

### SEE ALSO

* [runai config](runai_config.md) - configuration management

33 changes: 33 additions & 0 deletions docs/Researcher/cli-reference/new-cli/runai_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## runai list

[Deprecated] display resource list. By default displays the job list

```
runai list [flags]
```

### Options

```
-A, --all-projects list jobs from all projects
-h, --help help for list
-p, --project string Specify the project to which the command applies. By default, commands apply to the default project. To change the default project use ‘runai config project <project name>’
```

### Options inherited from parent commands

```
--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
-v, --verbose enable verbose mode
```

### SEE ALSO

* [runai](runai.md) - Run:ai Command-line Interface
* [runai list clusters](runai_list_clusters.md) - [Deprecated] list all available clusters
* [runai list jobs](runai_list_jobs.md) - [Deprecated] list all jobs
* [runai list nodes](runai_list_nodes.md) - [Deprecated] list all nodes
* [runai list projects](runai_list_projects.md) - [Deprecated] list all available projects

30 changes: 30 additions & 0 deletions docs/Researcher/cli-reference/new-cli/runai_list_clusters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## runai list clusters

[Deprecated] list all available clusters

```
runai list clusters [flags]
```

### Options

```
-h, --help help for clusters
--json Output structure JSON
--table Output structure table
--yaml Output structure YAML
```

### Options inherited from parent commands

```
--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
-v, --verbose enable verbose mode
```

### SEE ALSO

* [runai list](runai_list.md) - [Deprecated] display resource list. By default displays the job list

Loading

0 comments on commit c65453e

Please sign in to comment.