The current Run:AI command-line interface (CLI) is based on a single permission model. If you can run a workload using the CLI, then you can, in principle, use all projects, as well as view, change and delete other people's workloads. This is not a sustainable model for most organizations
We now introduce a new version of the CLI which is permission-aware. This guide is about how to migrate to this new version.
Recap on Projects
in Run:AI terminology, Projects are used to manage resource allocations for Researchers. Projects are defined by the administrator user interface (accessible at app.run.ai) and are associated, amongst other things, with a GPU quota available for users of this project.
Projects are utilized by using their name with the -p or --project flag in the CLI, for example when submitting a workload:
runai submit <job-name> ..... --project team-a
Permissions are based on Projects
With the new Run:AI architecture, permissions are based on the granularity of projects. Administrators can provide designated people with access to a project and only these people will be able to submit and view workloads based on that project.
This creates changes in the way the CLI works.
Changes with the new CLI
A workload now exists in the context of a project. When using a command, you must add the project name with the flag -p <project name>. Examples:
runai list -p team-a
runai bash <job-name> -p team-a
runai logs <job-name> -p team-a
If you want to avoid adding the -p flag, you can set a default project. To set 'team-a' as the default project, run:
runai project set team-a
Henceforth, all other CLI commands will be run in the context of the default project you have set.
You can also see the list of projects and view the current default project by running:
runai project list
To view all workloads you are authorized to, regardless of their associated project, use the -A flag:
runai list -A
After installing the new Run:AI CLI, workloads that have been submitted using the older version of the CLI may still be running.
Such workloads will be accessible to all researchers using the old methods, without the need for the -p flag, until a default project is set. Once a default project has been set, these older workloads will only be accessible by using the flag '--backward-compatibility' or '-b'. Example:
runai bash <old-job-name> -b
You can identify old jobs by adding the -b flag to the runai list command as such:
runai list -b
or by viewing all workloads using the -A flag:
runai list -A
For further information on how to authenticate users as well as providing user-access to Projects, please contact Run:AI customer support.