From 2d5978821bb71ada7124a57829ac5e188841694e Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Thu, 23 Dec 2021 11:50:56 +0200 Subject: [PATCH] Sort CLI commands, groups and topics alphabetically (#2488) --- CHANGELOG.D/2488.feature | 1 + CLI.md | 2704 ++++++++--------- neuro-cli/docs/acl.md | 74 +- neuro-cli/docs/admin.md | 356 +-- neuro-cli/docs/blob.md | 288 +- neuro-cli/docs/config.md | 164 +- neuro-cli/docs/disk.md | 50 +- neuro-cli/docs/image.md | 114 +- neuro-cli/docs/job.md | 370 +-- neuro-cli/docs/secret.md | 48 +- neuro-cli/docs/service-account.md | 30 +- neuro-cli/docs/shortcuts.md | 688 ++--- neuro-cli/docs/storage.md | 104 +- neuro-cli/src/neuro_cli/main.py | 2 +- neuro-cli/src/neuro_cli/topics.py | 5 +- neuro-cli/src/neuro_cli/utils.py | 3 - neuro-cli/tests/unit/test_click_utils.py | 2 +- neuro-sdk/setup.cfg | 2 +- .../src/neuro_sdk/_gcs_bucket_provider.py | 2 +- neuro-sdk/src/neuro_sdk/_jobs.py | 2 +- 20 files changed, 2502 insertions(+), 2507 deletions(-) create mode 100644 CHANGELOG.D/2488.feature diff --git a/CHANGELOG.D/2488.feature b/CHANGELOG.D/2488.feature new file mode 100644 index 000000000..743383ce3 --- /dev/null +++ b/CHANGELOG.D/2488.feature @@ -0,0 +1 @@ +Sort CLI commands, groups and topics alphabetically. diff --git a/CLI.md b/CLI.md index 82db2df8f..6b3c6b93c 100644 --- a/CLI.md +++ b/CLI.md @@ -2,141 +2,141 @@ # Table of Contents * [neuro](#neuro) + * [neuro acl](#neuro-acl) + * [neuro acl add-role](#neuro-acl-add-role) + * [neuro acl grant](#neuro-acl-grant) + * [neuro acl ls](#neuro-acl-ls) + * [neuro acl remove-role](#neuro-acl-remove-role) + * [neuro acl revoke](#neuro-acl-revoke) * [neuro admin](#neuro-admin) - * [neuro admin get-clusters](#neuro-admin-get-clusters) - * [neuro admin generate-cluster-config](#neuro-admin-generate-cluster-config) * [neuro admin add-cluster](#neuro-admin-add-cluster) - * [neuro admin remove-cluster](#neuro-admin-remove-cluster) - * [neuro admin show-cluster-options](#neuro-admin-show-cluster-options) - * [neuro admin get-cluster-users](#neuro-admin-get-cluster-users) * [neuro admin add-cluster-user](#neuro-admin-add-cluster-user) - * [neuro admin remove-cluster-user](#neuro-admin-remove-cluster-user) - * [neuro admin get-user-quota](#neuro-admin-get-user-quota) - * [neuro admin set-user-quota](#neuro-admin-set-user-quota) - * [neuro admin set-user-credits](#neuro-admin-set-user-credits) - * [neuro admin add-user-credits](#neuro-admin-add-user-credits) + * [neuro admin add-org](#neuro-admin-add-org) + * [neuro admin add-org-cluster](#neuro-admin-add-org-cluster) + * [neuro admin add-org-cluster-credits](#neuro-admin-add-org-cluster-credits) + * [neuro admin add-org-user](#neuro-admin-add-org-user) * [neuro admin add-resource-preset](#neuro-admin-add-resource-preset) - * [neuro admin update-resource-preset](#neuro-admin-update-resource-preset) - * [neuro admin remove-resource-preset](#neuro-admin-remove-resource-preset) + * [neuro admin add-user-credits](#neuro-admin-add-user-credits) + * [neuro admin generate-cluster-config](#neuro-admin-generate-cluster-config) + * [neuro admin get-cluster-users](#neuro-admin-get-cluster-users) + * [neuro admin get-clusters](#neuro-admin-get-clusters) + * [neuro admin get-org-cluster-quota](#neuro-admin-get-org-cluster-quota) + * [neuro admin get-org-clusters](#neuro-admin-get-org-clusters) + * [neuro admin get-org-users](#neuro-admin-get-org-users) * [neuro admin get-orgs](#neuro-admin-get-orgs) - * [neuro admin add-org](#neuro-admin-add-org) + * [neuro admin get-user-quota](#neuro-admin-get-user-quota) + * [neuro admin remove-cluster](#neuro-admin-remove-cluster) + * [neuro admin remove-cluster-user](#neuro-admin-remove-cluster-user) * [neuro admin remove-org](#neuro-admin-remove-org) - * [neuro admin get-org-users](#neuro-admin-get-org-users) - * [neuro admin add-org-user](#neuro-admin-add-org-user) * [neuro admin remove-org-user](#neuro-admin-remove-org-user) - * [neuro admin get-org-clusters](#neuro-admin-get-org-clusters) - * [neuro admin add-org-cluster](#neuro-admin-add-org-cluster) - * [neuro admin get-org-cluster-quota](#neuro-admin-get-org-cluster-quota) - * [neuro admin set-org-cluster-quota](#neuro-admin-set-org-cluster-quota) + * [neuro admin remove-resource-preset](#neuro-admin-remove-resource-preset) * [neuro admin set-org-cluster-credits](#neuro-admin-set-org-cluster-credits) - * [neuro admin add-org-cluster-credits](#neuro-admin-add-org-cluster-credits) - * [neuro job](#neuro-job) - * [neuro job run](#neuro-job-run) - * [neuro job generate-run-command](#neuro-job-generate-run-command) - * [neuro job ls](#neuro-job-ls) - * [neuro job status](#neuro-job-status) - * [neuro job exec](#neuro-job-exec) - * [neuro job port-forward](#neuro-job-port-forward) - * [neuro job logs](#neuro-job-logs) - * [neuro job kill](#neuro-job-kill) - * [neuro job top](#neuro-job-top) - * [neuro job save](#neuro-job-save) - * [neuro job browse](#neuro-job-browse) - * [neuro job attach](#neuro-job-attach) - * [neuro job bump-life-span](#neuro-job-bump-life-span) - * [neuro project](#neuro-project) - * [neuro project init](#neuro-project-init) - * [neuro storage](#neuro-storage) - * [neuro storage cp](#neuro-storage-cp) - * [neuro storage ls](#neuro-storage-ls) - * [neuro storage glob](#neuro-storage-glob) - * [neuro storage rm](#neuro-storage-rm) - * [neuro storage mkdir](#neuro-storage-mkdir) - * [neuro storage mv](#neuro-storage-mv) - * [neuro storage tree](#neuro-storage-tree) - * [neuro storage df](#neuro-storage-df) - * [neuro image](#neuro-image) - * [neuro image ls](#neuro-image-ls) - * [neuro image push](#neuro-image-push) - * [neuro image pull](#neuro-image-pull) - * [neuro image rm](#neuro-image-rm) - * [neuro image size](#neuro-image-size) - * [neuro image digest](#neuro-image-digest) - * [neuro image tags](#neuro-image-tags) + * [neuro admin set-org-cluster-quota](#neuro-admin-set-org-cluster-quota) + * [neuro admin set-user-credits](#neuro-admin-set-user-credits) + * [neuro admin set-user-quota](#neuro-admin-set-user-quota) + * [neuro admin show-cluster-options](#neuro-admin-show-cluster-options) + * [neuro admin update-resource-preset](#neuro-admin-update-resource-preset) + * [neuro blob](#neuro-blob) + * [neuro blob cp](#neuro-blob-cp) + * [neuro blob du](#neuro-blob-du) + * [neuro blob glob](#neuro-blob-glob) + * [neuro blob importbucket](#neuro-blob-importbucket) + * [neuro blob ls](#neuro-blob-ls) + * [neuro blob lsbucket](#neuro-blob-lsbucket) + * [neuro blob lscredentials](#neuro-blob-lscredentials) + * [neuro blob mkbucket](#neuro-blob-mkbucket) + * [neuro blob mkcredentials](#neuro-blob-mkcredentials) + * [neuro blob rm](#neuro-blob-rm) + * [neuro blob rmbucket](#neuro-blob-rmbucket) + * [neuro blob rmcredentials](#neuro-blob-rmcredentials) + * [neuro blob set-bucket-publicity](#neuro-blob-set-bucket-publicity) + * [neuro blob sign-url](#neuro-blob-sign-url) + * [neuro blob statbucket](#neuro-blob-statbucket) + * [neuro blob statcredentials](#neuro-blob-statcredentials) + * [neuro completion](#neuro-completion) + * [neuro completion generate](#neuro-completion-generate) + * [neuro completion patch](#neuro-completion-patch) * [neuro config](#neuro-config) + * [neuro config aliases](#neuro-config-aliases) + * [neuro config docker](#neuro-config-docker) + * [neuro config get-clusters](#neuro-config-get-clusters) * [neuro config login](#neuro-config-login) - * [neuro config login-with-token](#neuro-config-login-with-token) * [neuro config login-headless](#neuro-config-login-headless) + * [neuro config login-with-token](#neuro-config-login-with-token) + * [neuro config logout](#neuro-config-logout) * [neuro config show](#neuro-config-show) * [neuro config show-token](#neuro-config-show-token) - * [neuro config aliases](#neuro-config-aliases) - * [neuro config get-clusters](#neuro-config-get-clusters) * [neuro config switch-cluster](#neuro-config-switch-cluster) * [neuro config switch-org](#neuro-config-switch-org) - * [neuro config docker](#neuro-config-docker) - * [neuro config logout](#neuro-config-logout) - * [neuro completion](#neuro-completion) - * [neuro completion generate](#neuro-completion-generate) - * [neuro completion patch](#neuro-completion-patch) - * [neuro acl](#neuro-acl) - * [neuro acl grant](#neuro-acl-grant) - * [neuro acl revoke](#neuro-acl-revoke) - * [neuro acl ls](#neuro-acl-ls) - * [neuro acl add-role](#neuro-acl-add-role) - * [neuro acl remove-role](#neuro-acl-remove-role) - * [neuro blob](#neuro-blob) - * [neuro blob lsbucket](#neuro-blob-lsbucket) - * [neuro blob mkbucket](#neuro-blob-mkbucket) - * [neuro blob importbucket](#neuro-blob-importbucket) - * [neuro blob statbucket](#neuro-blob-statbucket) - * [neuro blob rmbucket](#neuro-blob-rmbucket) - * [neuro blob set-bucket-publicity](#neuro-blob-set-bucket-publicity) - * [neuro blob lscredentials](#neuro-blob-lscredentials) - * [neuro blob mkcredentials](#neuro-blob-mkcredentials) - * [neuro blob statcredentials](#neuro-blob-statcredentials) - * [neuro blob rmcredentials](#neuro-blob-rmcredentials) - * [neuro blob cp](#neuro-blob-cp) - * [neuro blob ls](#neuro-blob-ls) - * [neuro blob glob](#neuro-blob-glob) - * [neuro blob rm](#neuro-blob-rm) - * [neuro blob sign-url](#neuro-blob-sign-url) - * [neuro blob du](#neuro-blob-du) - * [neuro secret](#neuro-secret) - * [neuro secret ls](#neuro-secret-ls) - * [neuro secret add](#neuro-secret-add) - * [neuro secret rm](#neuro-secret-rm) * [neuro disk](#neuro-disk) - * [neuro disk ls](#neuro-disk-ls) * [neuro disk create](#neuro-disk-create) * [neuro disk get](#neuro-disk-get) + * [neuro disk ls](#neuro-disk-ls) * [neuro disk rm](#neuro-disk-rm) + * [neuro image](#neuro-image) + * [neuro image digest](#neuro-image-digest) + * [neuro image ls](#neuro-image-ls) + * [neuro image pull](#neuro-image-pull) + * [neuro image push](#neuro-image-push) + * [neuro image rm](#neuro-image-rm) + * [neuro image size](#neuro-image-size) + * [neuro image tags](#neuro-image-tags) + * [neuro job](#neuro-job) + * [neuro job attach](#neuro-job-attach) + * [neuro job browse](#neuro-job-browse) + * [neuro job bump-life-span](#neuro-job-bump-life-span) + * [neuro job exec](#neuro-job-exec) + * [neuro job generate-run-command](#neuro-job-generate-run-command) + * [neuro job kill](#neuro-job-kill) + * [neuro job logs](#neuro-job-logs) + * [neuro job ls](#neuro-job-ls) + * [neuro job port-forward](#neuro-job-port-forward) + * [neuro job run](#neuro-job-run) + * [neuro job save](#neuro-job-save) + * [neuro job status](#neuro-job-status) + * [neuro job top](#neuro-job-top) + * [neuro project](#neuro-project) + * [neuro project init](#neuro-project-init) + * [neuro secret](#neuro-secret) + * [neuro secret add](#neuro-secret-add) + * [neuro secret ls](#neuro-secret-ls) + * [neuro secret rm](#neuro-secret-rm) * [neuro service-account](#neuro-service-account) - * [neuro service-account ls](#neuro-service-account-ls) * [neuro service-account create](#neuro-service-account-create) * [neuro service-account get](#neuro-service-account-get) + * [neuro service-account ls](#neuro-service-account-ls) * [neuro service-account rm](#neuro-service-account-rm) - * [neuro help](#neuro-help) - * [neuro run](#neuro-run) - * [neuro ps](#neuro-ps) - * [neuro status](#neuro-status) - * [neuro exec](#neuro-exec) - * [neuro port-forward](#neuro-port-forward) + * [neuro storage](#neuro-storage) + * [neuro storage cp](#neuro-storage-cp) + * [neuro storage df](#neuro-storage-df) + * [neuro storage glob](#neuro-storage-glob) + * [neuro storage ls](#neuro-storage-ls) + * [neuro storage mkdir](#neuro-storage-mkdir) + * [neuro storage mv](#neuro-storage-mv) + * [neuro storage rm](#neuro-storage-rm) + * [neuro storage tree](#neuro-storage-tree) * [neuro attach](#neuro-attach) - * [neuro logs](#neuro-logs) + * [neuro cp](#neuro-cp) + * [neuro exec](#neuro-exec) + * [neuro help](#neuro-help) + * [neuro images](#neuro-images) * [neuro kill](#neuro-kill) - * [neuro top](#neuro-top) - * [neuro save](#neuro-save) * [neuro login](#neuro-login) * [neuro logout](#neuro-logout) - * [neuro cp](#neuro-cp) + * [neuro logs](#neuro-logs) * [neuro ls](#neuro-ls) - * [neuro rm](#neuro-rm) * [neuro mkdir](#neuro-mkdir) * [neuro mv](#neuro-mv) - * [neuro images](#neuro-images) - * [neuro push](#neuro-push) + * [neuro port-forward](#neuro-port-forward) + * [neuro ps](#neuro-ps) * [neuro pull](#neuro-pull) + * [neuro push](#neuro-push) + * [neuro rm](#neuro-rm) + * [neuro run](#neuro-run) + * [neuro save](#neuro-save) * [neuro share](#neuro-share) + * [neuro status](#neuro-status) + * [neuro top](#neuro-top) # neuro @@ -169,58 +169,58 @@ Name | Description| |Usage|Description| |---|---| +| _[neuro acl](#neuro-acl)_| Access Control List management | | _[neuro admin](#neuro-admin)_| Cluster administration commands | +| _[neuro blob](#neuro-blob)_| Blob storage operations | +| _[neuro completion](#neuro-completion)_| Output shell completion code | +| _[neuro config](#neuro-config)_| Client configuration | +| _[neuro disk](#neuro-disk)_| Operations with disks | +| _[neuro image](#neuro-image)_| Container image operations | | _[neuro job](#neuro-job)_| Job operations | | _[neuro project](#neuro-project)_| \(Deprecated) Project operations | -| _[neuro storage](#neuro-storage)_| Storage operations | -| _[neuro image](#neuro-image)_| Container image operations | -| _[neuro config](#neuro-config)_| Client configuration | -| _[neuro completion](#neuro-completion)_| Output shell completion code | -| _[neuro acl](#neuro-acl)_| Access Control List management | -| _[neuro blob](#neuro-blob)_| Blob storage operations | | _[neuro secret](#neuro-secret)_| Operations with secrets | -| _[neuro disk](#neuro-disk)_| Operations with disks | | _[neuro service-account](#neuro-service-account)_| Operations with service accounts | +| _[neuro storage](#neuro-storage)_| Storage operations | **Commands:** |Usage|Description| |---|---| -| _[neuro help](#neuro-help)_| Get help on a command | -| _[neuro run](#neuro-run)_| Run a job | -| _[neuro ps](#neuro-ps)_| List all jobs | -| _[neuro status](#neuro-status)_| Display status of a job | -| _[neuro exec](#neuro-exec)_| Execute command in a running job | -| _[neuro port-forward](#neuro-port-forward)_| Forward port\(s) of a job | | _[neuro attach](#neuro-attach)_| Attach terminal to a job | -| _[neuro logs](#neuro-logs)_| Print the logs for a job | +| _[neuro cp](#neuro-cp)_| Copy files and directories | +| _[neuro exec](#neuro-exec)_| Execute command in a running job | +| _[neuro help](#neuro-help)_| Get help on a command | +| _[neuro images](#neuro-images)_| List images | | _[neuro kill](#neuro-kill)_| Kill job\(s) | -| _[neuro top](#neuro-top)_| Display GPU/CPU/Memory usage | -| _[neuro save](#neuro-save)_| Save job's state to an image | | _[neuro login](#neuro-login)_| Log into Neuro Platform | | _[neuro logout](#neuro-logout)_| Log out | -| _[neuro cp](#neuro-cp)_| Copy files and directories | +| _[neuro logs](#neuro-logs)_| Print the logs for a job | | _[neuro ls](#neuro-ls)_| List directory contents | -| _[neuro rm](#neuro-rm)_| Remove files or directories | | _[neuro mkdir](#neuro-mkdir)_| Make directories | | _[neuro mv](#neuro-mv)_| Move or rename files and directories | -| _[neuro images](#neuro-images)_| List images | -| _[neuro push](#neuro-push)_| Push an image to platform registry | +| _[neuro port-forward](#neuro-port-forward)_| Forward port\(s) of a job | +| _[neuro ps](#neuro-ps)_| List all jobs | | _[neuro pull](#neuro-pull)_| Pull an image from platform registry | +| _[neuro push](#neuro-push)_| Push an image to platform registry | +| _[neuro rm](#neuro-rm)_| Remove files or directories | +| _[neuro run](#neuro-run)_| Run a job | +| _[neuro save](#neuro-save)_| Save job's state to an image | | _[neuro share](#neuro-share)_| Shares resource with another user | +| _[neuro status](#neuro-status)_| Display status of a job | +| _[neuro top](#neuro-top)_| Display GPU/CPU/Memory usage | -## neuro admin +## neuro acl -Cluster administration commands. +Access Control List management. **Usage:** ```bash -neuro admin [OPTIONS] COMMAND [ARGS]... +neuro acl [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -234,45 +234,31 @@ Name | Description| |Usage|Description| |---|---| -| _[neuro admin get-clusters](#neuro-admin-get-clusters)_| Print the list of available clusters | -| _[neuro admin generate\-cluster-config](#neuro-admin-generate-cluster-config)_| Create a cluster configuration file | -| _[neuro admin add-cluster](#neuro-admin-add-cluster)_| Create a new cluster | -| _[neuro admin remove-cluster](#neuro-admin-remove-cluster)_| Drop a cluster | -| _[neuro admin show\-cluster-options](#neuro-admin-show-cluster-options)_| Show available cluster options | -| _[neuro admin get\-cluster-users](#neuro-admin-get-cluster-users)_| List users in specified cluster | -| _[neuro admin add\-cluster-user](#neuro-admin-add-cluster-user)_| Add user access to specified cluster | -| _[neuro admin remove\-cluster-user](#neuro-admin-remove-cluster-user)_| Remove user access from the cluster | -| _[neuro admin get\-user-quota](#neuro-admin-get-user-quota)_| Get info about user quota in given cluster | -| _[neuro admin set\-user-quota](#neuro-admin-set-user-quota)_| Set user quota to given values | -| _[neuro admin set\-user-credits](#neuro-admin-set-user-credits)_| Set user credits to given value | -| _[neuro admin add\-user-credits](#neuro-admin-add-user-credits)_| Add given values to user quota | -| _[neuro admin add\-resource-preset](#neuro-admin-add-resource-preset)_| Add new resource preset | -| _[neuro admin update\-resource-preset](#neuro-admin-update-resource-preset)_| Update existing resource preset | -| _[neuro admin remove\-resource-preset](#neuro-admin-remove-resource-preset)_| Remove resource preset | -| _[neuro admin get-orgs](#neuro-admin-get-orgs)_| Print the list of available orgs | -| _[neuro admin add-org](#neuro-admin-add-org)_| Create a new org | -| _[neuro admin remove-org](#neuro-admin-remove-org)_| Drop a org | -| _[neuro admin get\-org-users](#neuro-admin-get-org-users)_| List users in specified org | -| _[neuro admin add\-org-user](#neuro-admin-add-org-user)_| Add user access to specified org | -| _[neuro admin remove\-org-user](#neuro-admin-remove-org-user)_| Remove user access from the org | -| _[neuro admin get\-org-clusters](#neuro-admin-get-org-clusters)_| Print the list of all orgs in the cluster | -| _[neuro admin add\-org-cluster](#neuro-admin-add-org-cluster)_| Add org access to specified cluster | -| _[neuro admin get\-org-cluster-quota](#neuro-admin-get-org-cluster-quota)_| Get info about org quota in given cluster | -| _[neuro admin set\-org-cluster-quota](#neuro-admin-set-org-cluster-quota)_| Set org cluster quota to given values | -| _[neuro admin set\-org-cluster-credits](#neuro-admin-set-org-cluster-credits)_| Set org cluster credits to given value | -| _[neuro admin add\-org-cluster-credits](#neuro-admin-add-org-cluster-credits)_| Add given values to org cluster balance | +| _[neuro acl add-role](#neuro-acl-add-role)_| Add new role | +| _[neuro acl grant](#neuro-acl-grant)_| Shares resource with another user | +| _[neuro acl ls](#neuro-acl-ls)_| List shared resources | +| _[neuro acl remove-role](#neuro-acl-remove-role)_| Remove existing role | +| _[neuro acl revoke](#neuro-acl-revoke)_| Revoke user access from another user | -### neuro admin get-clusters +### neuro acl add-role -Print the list of available clusters. +Add new role.
**Usage:** ```bash -neuro admin get-clusters [OPTIONS] +neuro acl add-role [OPTIONS] ROLE_NAME +``` + +**Examples:** + +```bash + +neuro acl add-role mycompany/subdivision + ``` **Options:** @@ -284,14 +270,24 @@ Name | Description| -### neuro admin generate-cluster-config +### neuro acl grant -Create a cluster configuration file. +Shares resource with another user.

URI shared resource.

USER username to share resource with.

PERMISSION sharing access right: read, write, or manage.
**Usage:** ```bash -neuro admin generate-cluster-config [OPTIONS] [CONFIG] +neuro acl grant [OPTIONS] URI USER {read|write|manage} +``` + +**Examples:** + +```bash + +neuro acl grant storage:///sample_data/ alice manage +neuro acl grant image:resnet50 bob read +neuro acl grant job:///my_job_id alice write + ``` **Options:** @@ -299,19 +295,29 @@ neuro admin generate-cluster-config [OPTIONS] [CONFIG] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--type \[aws | gcp | azure | vcd]_|| -### neuro admin add-cluster +### neuro acl ls -Create a new cluster.

Creates cluster entry on admin side and then start its provisioning using
provided config. +List shared resources.

The command displays a list of resources shared BY current user \(default).

To display a list of resources shared WITH current user apply --shared option.
**Usage:** ```bash -neuro admin add-cluster [OPTIONS] CLUSTER_NAME CONFIG +neuro acl ls [OPTIONS] [URI] +``` + +**Examples:** + +```bash + +neuro acl list +neuro acl list storage:// +neuro acl list --shared +neuro acl list --shared image:// + ``` **Options:** @@ -319,18 +325,29 @@ neuro admin add-cluster [OPTIONS] CLUSTER_NAME CONFIG Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\--full-uri_|Output full URI.| +|_--shared_|Output the resources shared by the user.| +|_-u TEXT_|Use specified user or role.| -### neuro admin remove-cluster +### neuro acl remove-role -Drop a cluster

Completely removes cluster from the system. +Remove existing role.
**Usage:** ```bash -neuro admin remove-cluster [OPTIONS] CLUSTER_NAME +neuro acl remove-role [OPTIONS] ROLE_NAME +``` + +**Examples:** + +```bash + +neuro acl remove-role mycompany/subdivision + ``` **Options:** @@ -338,19 +355,28 @@ neuro admin remove-cluster [OPTIONS] CLUSTER_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--force_|Skip prompt| -### neuro admin show-cluster-options +### neuro acl revoke -Show available cluster options. +Revoke user access from another user.

URI previously shared resource to revoke.

USER to revoke URI resource from.
**Usage:** ```bash -neuro admin show-cluster-options [OPTIONS] +neuro acl revoke [OPTIONS] URI USER +``` + +**Examples:** + +```bash + +neuro acl revoke storage:///sample_data/ alice +neuro acl revoke image:resnet50 bob +neuro acl revoke job:///my_job_id alice + ``` **Options:** @@ -358,19 +384,18 @@ neuro admin show-cluster-options [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--type \[aws | gcp | azure]_|| -### neuro admin get-cluster-users +## neuro admin -List users in specified cluster +Cluster administration commands. **Usage:** ```bash -neuro admin get-cluster-users [OPTIONS] [CLUSTER_NAME] +neuro admin [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -378,19 +403,51 @@ neuro admin get-cluster-users [OPTIONS] [CLUSTER_NAME] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--org ORG_|org name for org-cluster users| + + +**Commands:** + +|Usage|Description| +|---|---| +| _[neuro admin add-cluster](#neuro-admin-add-cluster)_| Create a new cluster | +| _[neuro admin add\-cluster-user](#neuro-admin-add-cluster-user)_| Add user access to specified cluster | +| _[neuro admin add-org](#neuro-admin-add-org)_| Create a new org | +| _[neuro admin add\-org-cluster](#neuro-admin-add-org-cluster)_| Add org access to specified cluster | +| _[neuro admin add\-org-cluster-credits](#neuro-admin-add-org-cluster-credits)_| Add given values to org cluster balance | +| _[neuro admin add\-org-user](#neuro-admin-add-org-user)_| Add user access to specified org | +| _[neuro admin add\-resource-preset](#neuro-admin-add-resource-preset)_| Add new resource preset | +| _[neuro admin add\-user-credits](#neuro-admin-add-user-credits)_| Add given values to user quota | +| _[neuro admin generate\-cluster-config](#neuro-admin-generate-cluster-config)_| Create a cluster configuration file | +| _[neuro admin get\-cluster-users](#neuro-admin-get-cluster-users)_| List users in specified cluster | +| _[neuro admin get-clusters](#neuro-admin-get-clusters)_| Print the list of available clusters | +| _[neuro admin get\-org-cluster-quota](#neuro-admin-get-org-cluster-quota)_| Get info about org quota in given cluster | +| _[neuro admin get\-org-clusters](#neuro-admin-get-org-clusters)_| Print the list of all orgs in the cluster | +| _[neuro admin get\-org-users](#neuro-admin-get-org-users)_| List users in specified org | +| _[neuro admin get-orgs](#neuro-admin-get-orgs)_| Print the list of available orgs | +| _[neuro admin get\-user-quota](#neuro-admin-get-user-quota)_| Get info about user quota in given cluster | +| _[neuro admin remove-cluster](#neuro-admin-remove-cluster)_| Drop a cluster | +| _[neuro admin remove\-cluster-user](#neuro-admin-remove-cluster-user)_| Remove user access from the cluster | +| _[neuro admin remove-org](#neuro-admin-remove-org)_| Drop a org | +| _[neuro admin remove\-org-user](#neuro-admin-remove-org-user)_| Remove user access from the org | +| _[neuro admin remove\-resource-preset](#neuro-admin-remove-resource-preset)_| Remove resource preset | +| _[neuro admin set\-org-cluster-credits](#neuro-admin-set-org-cluster-credits)_| Set org cluster credits to given value | +| _[neuro admin set\-org-cluster-quota](#neuro-admin-set-org-cluster-quota)_| Set org cluster quota to given values | +| _[neuro admin set\-user-credits](#neuro-admin-set-user-credits)_| Set user credits to given value | +| _[neuro admin set\-user-quota](#neuro-admin-set-user-quota)_| Set user quota to given values | +| _[neuro admin show\-cluster-options](#neuro-admin-show-cluster-options)_| Show available cluster options | +| _[neuro admin update\-resource-preset](#neuro-admin-update-resource-preset)_| Update existing resource preset | -### neuro admin add-cluster-user +### neuro admin add-cluster -Add user access to specified cluster.

The command supports one of 3 user roles: admin, manager or user. +Create a new cluster.

Creates cluster entry on admin side and then start its provisioning using
provided config. **Usage:** ```bash -neuro admin add-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME [ROLE] +neuro admin add-cluster [OPTIONS] CLUSTER_NAME CONFIG ``` **Options:** @@ -398,21 +455,18 @@ neuro admin add-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME [ROLE] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-c, --credits AMOUNT_|Credits amount to set \(`unlimited' stands for no limit) \[default: unlimited]| -|_\-j, --jobs AMOUNT_|Maximum running jobs quota \(`unlimited' stands for no limit) \[default: unlimited]| -|_--org ORG_|org name for org-cluster users| -### neuro admin remove-cluster-user +### neuro admin add-cluster-user -Remove user access from the cluster. +Add user access to specified cluster.

The command supports one of 3 user roles: admin, manager or user. **Usage:** ```bash -neuro admin remove-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin add-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME [ROLE] ``` **Options:** @@ -420,19 +474,21 @@ neuro admin remove-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\-c, --credits AMOUNT_|Credits amount to set \(`unlimited' stands for no limit) \[default: unlimited]| +|_\-j, --jobs AMOUNT_|Maximum running jobs quota \(`unlimited' stands for no limit) \[default: unlimited]| |_--org ORG_|org name for org-cluster users| -### neuro admin get-user-quota +### neuro admin add-org -Get info about user quota in given cluster +Create a new org. **Usage:** ```bash -neuro admin get-user-quota [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin add-org [OPTIONS] ORG_NAME ``` **Options:** @@ -440,19 +496,18 @@ neuro admin get-user-quota [OPTIONS] CLUSTER_NAME USER_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--org ORG_|org name for org-cluster users| -### neuro admin set-user-quota +### neuro admin add-org-cluster -Set user quota to given values +Add org access to specified cluster. **Usage:** ```bash -neuro admin set-user-quota [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin add-org-cluster [OPTIONS] CLUSTER_NAME ORG_NAME ``` **Options:** @@ -460,20 +515,20 @@ neuro admin set-user-quota [OPTIONS] CLUSTER_NAME USER_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-j, --jobs AMOUNT_|Maximum running jobs quota \(`unlimited' stands for no limit) \[required]| -|_--org ORG_|org name for org-cluster users| +|_\-c, --credits AMOUNT_|Credits amount to set \(`unlimited' stands for no limit) \[default: unlimited]| +|_\-j, --jobs AMOUNT_|Maximum running jobs quota \(`unlimited' stands for no limit) \[default: unlimited]| -### neuro admin set-user-credits +### neuro admin add-org-cluster-credits -Set user credits to given value +Add given values to org cluster balance **Usage:** ```bash -neuro admin set-user-credits [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin add-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME ``` **Options:** @@ -481,20 +536,19 @@ neuro admin set-user-credits [OPTIONS] CLUSTER_NAME USER_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-c, --credits AMOUNT_|Credits amount to set \(`unlimited' stands for no limit) \[required]| -|_--org ORG_|org name for org-cluster users| +|_\-c, --credits AMOUNT_|Credits amount to add| -### neuro admin add-user-credits +### neuro admin add-org-user -Add given values to user quota +Add user access to specified org.

The command supports one of 3 user roles: admin, manager or user. **Usage:** ```bash -neuro admin add-user-credits [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin add-org-user [OPTIONS] ORG_NAME USER_NAME [ROLE] ``` **Options:** @@ -502,8 +556,6 @@ neuro admin add-user-credits [OPTIONS] CLUSTER_NAME USER_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-c, --credits AMOUNT_|Credits amount to add \[required]| -|_--org ORG_|org name for org-cluster users| @@ -536,14 +588,14 @@ Name | Description| -### neuro admin update-resource-preset +### neuro admin add-user-credits -Update existing resource preset +Add given values to user quota **Usage:** ```bash -neuro admin update-resource-preset [OPTIONS] PRESET_NAME +neuro admin add-user-credits [OPTIONS] CLUSTER_NAME USER_NAME ``` **Options:** @@ -551,27 +603,20 @@ neuro admin update-resource-preset [OPTIONS] PRESET_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-c, --cpu NUMBER_|Number of CPUs| -|_\--credits-per-hour AMOUNT_|Price of running job of this preset for an hour in credits| -|_\-g, --gpu NUMBER_|Number of GPUs| -|_\--gpu-model MODEL_|GPU model| -|_\-m, --memory AMOUNT_|Memory amount| -|_\--preemptible-node / --non-preemptible-node_|Use a lower-cost preemptible instance| -|_\-p, --scheduler / -P, --no-scheduler_|Use round robin scheduler for jobs| -|_\--tpu-sw-version VERSION_|TPU software version| -|_\--tpu-type TYPE_|TPU type| +|_\-c, --credits AMOUNT_|Credits amount to add \[required]| +|_--org ORG_|org name for org-cluster users| -### neuro admin remove-resource-preset +### neuro admin generate-cluster-config -Remove resource preset +Create a cluster configuration file. **Usage:** ```bash -neuro admin remove-resource-preset [OPTIONS] PRESET_NAME +neuro admin generate-cluster-config [OPTIONS] [CONFIG] ``` **Options:** @@ -579,18 +624,19 @@ neuro admin remove-resource-preset [OPTIONS] PRESET_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--type \[aws | gcp | azure | vcd]_|| -### neuro admin get-orgs +### neuro admin get-cluster-users -Print the list of available orgs. +List users in specified cluster **Usage:** ```bash -neuro admin get-orgs [OPTIONS] +neuro admin get-cluster-users [OPTIONS] [CLUSTER_NAME] ``` **Options:** @@ -598,18 +644,19 @@ neuro admin get-orgs [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--org ORG_|org name for org-cluster users| -### neuro admin add-org +### neuro admin get-clusters -Create a new org. +Print the list of available clusters. **Usage:** ```bash -neuro admin add-org [OPTIONS] ORG_NAME +neuro admin get-clusters [OPTIONS] ``` **Options:** @@ -621,14 +668,14 @@ Name | Description| -### neuro admin remove-org +### neuro admin get-org-cluster-quota -Drop a org

Completely removes org from the system. +Get info about org quota in given cluster **Usage:** ```bash -neuro admin remove-org [OPTIONS] ORG_NAME +neuro admin get-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME ``` **Options:** @@ -636,19 +683,18 @@ neuro admin remove-org [OPTIONS] ORG_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--force_|Skip prompt| -### neuro admin get-org-users +### neuro admin get-org-clusters -List users in specified org +Print the list of all orgs in the cluster **Usage:** ```bash -neuro admin get-org-users [OPTIONS] ORG_NAME +neuro admin get-org-clusters [OPTIONS] CLUSTER_NAME ``` **Options:** @@ -660,14 +706,14 @@ Name | Description| -### neuro admin add-org-user +### neuro admin get-org-users -Add user access to specified org.

The command supports one of 3 user roles: admin, manager or user. +List users in specified org **Usage:** ```bash -neuro admin add-org-user [OPTIONS] ORG_NAME USER_NAME [ROLE] +neuro admin get-org-users [OPTIONS] ORG_NAME ``` **Options:** @@ -679,14 +725,14 @@ Name | Description| -### neuro admin remove-org-user +### neuro admin get-orgs -Remove user access from the org. +Print the list of available orgs. **Usage:** ```bash -neuro admin remove-org-user [OPTIONS] ORG_NAME USER_NAME +neuro admin get-orgs [OPTIONS] ``` **Options:** @@ -698,14 +744,14 @@ Name | Description| -### neuro admin get-org-clusters +### neuro admin get-user-quota -Print the list of all orgs in the cluster +Get info about user quota in given cluster **Usage:** ```bash -neuro admin get-org-clusters [OPTIONS] CLUSTER_NAME +neuro admin get-user-quota [OPTIONS] CLUSTER_NAME USER_NAME ``` **Options:** @@ -713,18 +759,19 @@ neuro admin get-org-clusters [OPTIONS] CLUSTER_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--org ORG_|org name for org-cluster users| -### neuro admin add-org-cluster +### neuro admin remove-cluster -Add org access to specified cluster. +Drop a cluster

Completely removes cluster from the system. **Usage:** ```bash -neuro admin add-org-cluster [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin remove-cluster [OPTIONS] CLUSTER_NAME ``` **Options:** @@ -732,20 +779,19 @@ neuro admin add-org-cluster [OPTIONS] CLUSTER_NAME ORG_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-c, --credits AMOUNT_|Credits amount to set \(`unlimited' stands for no limit) \[default: unlimited]| -|_\-j, --jobs AMOUNT_|Maximum running jobs quota \(`unlimited' stands for no limit) \[default: unlimited]| +|_--force_|Skip prompt| -### neuro admin get-org-cluster-quota +### neuro admin remove-cluster-user -Get info about org quota in given cluster +Remove user access from the cluster. **Usage:** ```bash -neuro admin get-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin remove-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME ``` **Options:** @@ -753,18 +799,19 @@ neuro admin get-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--org ORG_|org name for org-cluster users| -### neuro admin set-org-cluster-quota +### neuro admin remove-org -Set org cluster quota to given values +Drop a org

Completely removes org from the system. **Usage:** ```bash -neuro admin set-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin remove-org [OPTIONS] ORG_NAME ``` **Options:** @@ -772,19 +819,19 @@ neuro admin set-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-j, --jobs AMOUNT_|Maximum running jobs quota \(`unlimited' stands for no limit) \[required]| +|_--force_|Skip prompt| -### neuro admin set-org-cluster-credits +### neuro admin remove-org-user -Set org cluster credits to given value +Remove user access from the org. **Usage:** ```bash -neuro admin set-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin remove-org-user [OPTIONS] ORG_NAME USER_NAME ``` **Options:** @@ -792,19 +839,18 @@ neuro admin set-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-c, --credits AMOUNT_|Credits amount to set \(`unlimited' stands for no limit) \[required]| -### neuro admin add-org-cluster-credits +### neuro admin remove-resource-preset -Add given values to org cluster balance +Remove resource preset **Usage:** ```bash -neuro admin add-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin remove-resource-preset [OPTIONS] PRESET_NAME ``` **Options:** @@ -812,19 +858,18 @@ neuro admin add-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-c, --credits AMOUNT_|Credits amount to add| -## neuro job +### neuro admin set-org-cluster-credits -Job operations. +Set org cluster credits to given value **Usage:** ```bash -neuro job [OPTIONS] COMMAND [ARGS]... +neuro admin set-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME ``` **Options:** @@ -832,54 +877,19 @@ neuro job [OPTIONS] COMMAND [ARGS]... Name | Description| |----|------------| |_--help_|Show this message and exit.| - - -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro job run](#neuro-job-run)_| Run a job | -| _[neuro job generate\-run-command](#neuro-job-generate-run-command)_| Generate command that will rerun given job | -| _[neuro job ls](#neuro-job-ls)_| List all jobs | -| _[neuro job status](#neuro-job-status)_| Display status of a job | -| _[neuro job exec](#neuro-job-exec)_| Execute command in a running job | -| _[neuro job port-forward](#neuro-job-port-forward)_| Forward port\(s) of a job | -| _[neuro job logs](#neuro-job-logs)_| Print the logs for a job | -| _[neuro job kill](#neuro-job-kill)_| Kill job\(s) | -| _[neuro job top](#neuro-job-top)_| Display GPU/CPU/Memory usage | -| _[neuro job save](#neuro-job-save)_| Save job's state to an image | -| _[neuro job browse](#neuro-job-browse)_| Opens a job's URL in a web browser | -| _[neuro job attach](#neuro-job-attach)_| Attach terminal to a job | -| _[neuro job bump\-life-span](#neuro-job-bump-life-span)_| Increase job life span | +|_\-c, --credits AMOUNT_|Credits amount to set \(`unlimited' stands for no limit) \[required]| -### neuro job run +### neuro admin set-org-cluster-quota -Run a job

IMAGE docker image name to run in a job.

CMD list will be passed as arguments to the executed job's image.
+Set org cluster quota to given values **Usage:** ```bash -neuro job run [OPTIONS] IMAGE [-- CMD...] -``` - -**Examples:** - -```bash - -# Starts a container pytorch:latest on a machine with smaller GPU resources -# (see exact values in `neuro config show`) and with two volumes mounted: -# storage:/ --> /var/storage/home (in read-write mode), -# storage:/neuromation/public --> /var/storage/neuromation (in read-only mode). -neuro run --preset=gpu-small --volume=storage::/var/storage/home:rw \ ---volume=storage:/neuromation/public:/var/storage/home:ro pytorch:latest - -# Starts a container using the custom image my-ubuntu:latest stored in neuro -# registry, run /script.sh and pass arg1 and arg2 as its arguments: -neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 arg2 - +neuro admin set-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME ``` **Options:** @@ -887,53 +897,19 @@ neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 ar Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--browse_|Open a job's URL in a web browser| -|_--cluster CLUSTER_|Run job in a specified cluster| -|_\-d, --description DESC_|Optional job description in free format| -|_--detach_|Don't attach to job logs and don't wait for exit code| -|_--entrypoint TEXT_|Executable entrypoint in the container \(note that it overwrites `ENTRYPOINT` and `CMD` instructions of the docker image)| -|_\-e, --env VAR=VAL_|Set environment variable in container. Use multiple options to define more than one variable. See `neuro help secrets` for information about passing secrets as environment variables.| -|_\--env-file PATH_|File with environment variables to pass| -|_\-x, --extshm / -X, --no-extshm_|Request extended '/dev/shm' space \[default: x]| -|_--http PORT_|Enable HTTP port forwarding to container \[default: 80]| -|_\--http-auth / --no-http-auth_|Enable HTTP authentication for forwarded HTTP port \[default: True]| -|_\--life-span TIMEDELTA_|Optional job run-time limit in the format '1d2h3m4s' \(some parts may be missing). Set '0' to disable. Default value '1d' can be changed in the user config.| -|_\-n, --name NAME_|Optional job name| -|_--org ORG_|Run job in a specified org| -|_\--pass-config / --no-pass-config_|Upload neuro config to the job \[default: no\-pass-config]| -|_\--port-forward LOCAL\_PORT:REMOTE_RORT_|Forward port\(s) of a running job to local port\(s) \(use multiple times for forwarding several ports)| -|_\-s, --preset PRESET_|Predefined resource configuration \(to see available values, run `neuro config show`)| -|_--privileged_|Run job in privileged mode, if it is supported by cluster. \[default: False]| -|_\--restart \[never | on-failure | always]_|Restart policy to apply when a job exits \[default: never]| -|_\--schedule-timeout TIMEDELTA_|Optional job schedule timeout in the format '3m4s' \(some parts may be missing).| -|_--share USER_|Share job write permissions to user or role.| -|_--tag TAG_|Optional job tag, multiple values allowed| -|_\-t, --tty / -T, --no-tty_|Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script.| -|_\-v, --volume MOUNT_|Mounts directory from vault into container. Use multiple options to mount more than one volume. See `neuro help secrets` for information about passing secrets as mounted files.| -|_\--wait-for-seat / --no-wait-for-seat_|Wait for total running jobs quota \[default: no\-wait-for-seat]| -|_\--wait-start / --no-wait-start_|Wait for a job start or failure \[default: wait-start]| -|_\-w, --workdir TEXT_|Working directory inside the container| +|_\-j, --jobs AMOUNT_|Maximum running jobs quota \(`unlimited' stands for no limit) \[required]| -### neuro job generate-run-command +### neuro admin set-user-credits -Generate command that will rerun given job.
+Set user credits to given value **Usage:** -```bash -neuro job generate-run-command [OPTIONS] JOB -``` - -**Examples:** - -```bash - -# You can use the following to directly re-execute it: -eval $(neuro job generate-run-command ) - +```bash +neuro admin set-user-credits [OPTIONS] CLUSTER_NAME USER_NAME ``` **Options:** @@ -941,31 +917,20 @@ eval $(neuro job generate-run-command ) Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\-c, --credits AMOUNT_|Credits amount to set \(`unlimited' stands for no limit) \[required]| +|_--org ORG_|org name for org-cluster users| -### neuro job ls +### neuro admin set-user-quota -List all jobs.
+Set user quota to given values **Usage:** ```bash -neuro job ls [OPTIONS] -``` - -**Examples:** - -```bash - -neuro ps -a -neuro ps -a --owner=user-1 --owner=user-2 -neuro ps --name my-experiments-v1 -s failed -s succeeded -neuro ps --description=my favourite job -neuro ps -s failed -s succeeded -q -neuro ps -t tag1 -t tag2 - +neuro admin set-user-quota [OPTIONS] CLUSTER_NAME USER_NAME ``` **Options:** @@ -973,32 +938,20 @@ neuro ps -t tag1 -t tag2 Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-a, --all_|Show all jobs regardless the status.| -|_--cluster CLUSTER_|Show jobs on a specified cluster \(the current cluster by default).| -|_\-d, --description DESCRIPTION_|Filter out jobs by description \(exact match).| -|_--distinct_|Show only first job if names are same.| -|_--format COLUMNS_|Output table format, see "neuro help ps\-format" for more info about the format specification. The default can be changed using the job.ps-format configuration variable documented in "neuro help user-config"| -|_\--full-uri_|Output full image URI.| -|_\-n, --name NAME_|Filter out jobs by name.| -|_\-o, --owner TEXT_|Filter out jobs by owner \(multiple option). Supports `ME` option to filter by the current user.| -|_\--recent-first / --recent-last_|Show newer jobs first or last| -|_--since DATE\_OR_TIMEDELTA_|Show jobs created after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| -|_\-s, --status \[pending | suspended | running | succeeded | failed | cancelled]_|Filter out jobs by status \(multiple option).| -|_\-t, --tag TAG_|Filter out jobs by tag \(multiple option)| -|_--until DATE\_OR_TIMEDELTA_|Show jobs created before a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| -|_\-w, --wide_|Do not cut long lines for terminal width.| +|_\-j, --jobs AMOUNT_|Maximum running jobs quota \(`unlimited' stands for no limit) \[required]| +|_--org ORG_|org name for org-cluster users| -### neuro job status +### neuro admin show-cluster-options -Display status of a job. +Show available cluster options. **Usage:** ```bash -neuro job status [OPTIONS] JOB +neuro admin show-cluster-options [OPTIONS] ``` **Options:** @@ -1006,31 +959,47 @@ neuro job status [OPTIONS] JOB Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--full-uri_|Output full URI.| +|_--type \[aws | gcp | azure]_|| -### neuro job exec +### neuro admin update-resource-preset -Execute command in a running job.
+Update existing resource preset **Usage:** ```bash -neuro job exec [OPTIONS] JOB -- CMD... +neuro admin update-resource-preset [OPTIONS] PRESET_NAME ``` -**Examples:** +**Options:** -```bash +Name | Description| +|----|------------| +|_--help_|Show this message and exit.| +|_\-c, --cpu NUMBER_|Number of CPUs| +|_\--credits-per-hour AMOUNT_|Price of running job of this preset for an hour in credits| +|_\-g, --gpu NUMBER_|Number of GPUs| +|_\--gpu-model MODEL_|GPU model| +|_\-m, --memory AMOUNT_|Memory amount| +|_\--preemptible-node / --non-preemptible-node_|Use a lower-cost preemptible instance| +|_\-p, --scheduler / -P, --no-scheduler_|Use round robin scheduler for jobs| +|_\--tpu-sw-version VERSION_|TPU software version| +|_\--tpu-type TYPE_|TPU type| -# Provides a shell to the container: -neuro exec my-job -- /bin/bash -# Executes a single command in the container and returns the control: -neuro exec --no-tty my-job -- ls -l + +## neuro blob + +Blob storage operations. + +**Usage:** + +```bash +neuro blob [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -1038,38 +1007,69 @@ neuro exec --no-tty my-job -- ls -l Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-t, --tty / -T, --no-tty_|Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script.| + + +**Commands:** + +|Usage|Description| +|---|---| +| _[neuro blob cp](#neuro-blob-cp)_| Copy blobs into and from Blob Storage | +| _[neuro blob du](#neuro-blob-du)_| Get storage usage for BUCKET | +| _[neuro blob glob](#neuro-blob-glob)_| List resources that match PATTERNS | +| _[neuro blob importbucket](#neuro-blob-importbucket)_| Import an existing bucket | +| _[neuro blob ls](#neuro-blob-ls)_| List buckets or bucket contents | +| _[neuro blob lsbucket](#neuro-blob-lsbucket)_| List buckets | +| _[neuro blob lscredentials](#neuro-blob-lscredentials)_| List bucket credentials | +| _[neuro blob mkbucket](#neuro-blob-mkbucket)_| Create a new bucket | +| _[neuro blob mkcredentials](#neuro-blob-mkcredentials)_| Create a new bucket credential | +| _[neuro blob rm](#neuro-blob-rm)_| Remove blobs from bucket | +| _[neuro blob rmbucket](#neuro-blob-rmbucket)_| Remove bucket BUCKET | +| _[neuro blob rmcredentials](#neuro-blob-rmcredentials)_| Remove bucket credential BUCKET_CREDENTIAL | +| _[neuro blob set\-bucket-publicity](#neuro-blob-set-bucket-publicity)_| Change public access settings for BUCKET | +| _[neuro blob sign-url](#neuro-blob-sign-url)_| Make signed url for blob in bucket | +| _[neuro blob statbucket](#neuro-blob-statbucket)_| Get bucket BUCKET | +| _[neuro blob statcredentials](#neuro-blob-statcredentials)_| Get bucket credential BUCKET_CREDENTIAL | -### neuro job port-forward +### neuro blob cp -Forward port\(s) of a job.

Forwards port\(s) of a running job to local port\(s).
+Copy blobs into and from Blob Storage.

Either SOURCES or DESTINATION should have `blob://` scheme. If scheme is
omitted, file:// scheme is assumed. It is currently not possible to copy files
between Blob Storage \(`blob://`) destination, nor with `storage://` scheme
paths.

Use `/dev/stdin` and `/dev/stdout` file names to upload a file from standard
input or output to stdout.

Any number of \--exclude and --include options can be passed. The filters that
appear later in the command take precedence over filters that appear earlier
in the command. If neither \--exclude nor --include options are specified the
default can be changed using the storage.cp-exclude configuration variable
documented in "neuro help user-config".

File permissions, modification times and other attributes will not be passed
to Blob Storage metadata during upload. **Usage:** ```bash -neuro job port-forward [OPTIONS] JOB LOCAL_PORT:REMOTE_RORT... +neuro blob cp [OPTIONS] [SOURCES]... [DESTINATION] ``` -**Examples:** +**Options:** -```bash +Name | Description| +|----|------------| +|_--help_|Show this message and exit.| +|_--continue_|Continue copying partially-copied files. Only for copying from Blob Storage.| +|_\--exclude-from-files FILES_|A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp\-exclude-from-files configuration variable documented in "neuro help user-config"| +|_--exclude_|Exclude files and directories that match the specified pattern.| +|_--include_|Don't exclude files and directories that match the specified pattern.| +|_\--glob / --no-glob_|Expand glob patterns in SOURCES with explicit scheme. \[default: glob]| +|_\-T, --no-target-directory_|Treat DESTINATION as a normal file.| +|_\-p, --progress / -P, --no-progress_|Show progress, on by default.| +|_\-r, --recursive_|Recursive copy, off by default| +|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY.| +|_\-u, --update_|Copy only when the SOURCE file is newer than the destination file or when the destination file is missing.| -# Forward local port 2080 to port 80 of job's container. -# You can use http://localhost:2080 in browser to access job's served http -neuro job port-forward my-fastai-job 2080:80 -# Forward local port 2222 to job's port 22 -# Then copy all data from container's folder '/data' to current folder -# (please run second command in other terminal) -neuro job port-forward my-job-with-ssh-server 2222:22 -rsync -avxzhe ssh -p 2222 root@localhost:/data . -# Forward few ports at once -neuro job port-forward my-job 2080:80 2222:22 2000:100 +### neuro blob du + +Get storage usage for BUCKET. + +**Usage:** + +```bash +neuro blob du [OPTIONS] BUCKET ``` **Options:** @@ -1077,18 +1077,19 @@ neuro job port-forward my-job 2080:80 2222:22 2000:100 Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| -### neuro job logs +### neuro blob glob -Print the logs for a job. +List resources that match PATTERNS. **Usage:** ```bash -neuro job logs [OPTIONS] JOB +neuro blob glob [OPTIONS] [PATTERNS]... ``` **Options:** @@ -1096,20 +1097,19 @@ neuro job logs [OPTIONS] JOB Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--since DATE\_OR_TIMEDELTA_|Only return logs after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| -|_--timestamps_|Include timestamps on each line in the log output.| +|_\--full-uri_|Output full bucket URI.| -### neuro job kill +### neuro blob importbucket -Kill job\(s). +Import an existing bucket. **Usage:** ```bash -neuro job kill [OPTIONS] JOBS... +neuro blob importbucket [OPTIONS] ``` **Options:** @@ -1117,30 +1117,54 @@ neuro job kill [OPTIONS] JOBS... Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\--aws-access-key-id AWS\_ACCESS_KEY_ID_|AWS access\_key_id to use to access the bucket. Required when PROVIDER is 'aws'| +|_\--aws-endpoint-url AWS_ENDPOINT_|AWS endpoint to use to access the bucket. Usually you need to set this if you use non-AWS S3 compatible provider| +|_\--aws-region-name AWS_REGION_|AWS region to use to access the bucket.| +|_\--aws-secret-access-key AWS\_SECRET_ACCESS_KEY_|AWS secret\_access_key to use to access the bucket. Required when PROVIDER is 'aws'| +|_\--azure-storage-account-url AZURE\_STORAGE_ACCOUNT_URL_|Azure account url. Usually it has following format: https://.blob.core.windows.net Required when PROVIDER is 'azure'| +|_\--azure-storage-credential AZURE\_STORAGE_CREDENTIAL_|Azure storage credential that grants access to imported bucket. Either this or AZURE_SAS is required when PROVIDER is 'azure'| +|_\--azure-storage-sas-token AZURE_SAS_|Azure shared access signature token that grants access to imported bucket. Either this or AZURE\_STORAGE_CREDENTIAL is required when PROVIDER is 'azure'| +|_--cluster CLUSTER_|Perform in a specified cluster \(the current cluster by default).| +|_\--gcp-sa-credential GCP\_SA_CREDNETIAL_|GCP service account credential in form of base64 encoded json string that grants access to imported bucket. Required when PROVIDER is 'gcp'| +|_--name NAME_|Optional bucket name| +|_--org ORG_|Perform in a specified org \(the current org by default).| +|_--provider PROVIDER_|Bucket provider that hosts bucket \[required]| +|_\--provider-bucket-name EXTERNAL_NAME_|Name of bucket \(or container in case of Azure) inside the provider \[required]| -### neuro job top +### neuro blob ls -Display GPU/CPU/Memory usage.
+List buckets or bucket contents. **Usage:** ```bash -neuro job top [OPTIONS] [JOBS]... +neuro blob ls [OPTIONS] [PATHS]... ``` -**Examples:** +**Options:** -```bash +Name | Description| +|----|------------| +|_--help_|Show this message and exit.| +|_-l_|use a long listing format.| +|_\--full-uri_|Output full bucket URI.| +|_\-h, --human-readable_|with -l print human readable sizes \(e.g., 2K, 540M).| +|_\-r, --recursive_|List all keys under the URL path provided, not just 1 level depths.| -neuro top -neuro top job-1 job-2 -neuro top --owner=user-1 --owner=user-2 -neuro top --name my-experiments-v1 -neuro top -t tag1 -t tag2 + + +### neuro blob lsbucket + +List buckets. + +**Usage:** + +```bash +neuro blob lsbucket [OPTIONS] ``` **Options:** @@ -1148,39 +1172,41 @@ neuro top -t tag1 -t tag2 Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Show jobs on a specified cluster \(the current cluster by default).| -|_\-d, --description DESCRIPTION_|Filter out jobs by description \(exact match).| -|_--format COLUMNS_|Output table format, see "neuro help top\-format" for more info about the format specification. The default can be changed using the job.top-format configuration variable documented in "neuro help user-config"| -|_\--full-uri_|Output full image URI.| -|_\-n, --name NAME_|Filter out jobs by name.| -|_\-o, --owner TEXT_|Filter out jobs by owner \(multiple option). Supports `ME` option to filter by the current user. Specify `ALL` to show jobs of all users.| -|_--since DATE\_OR_TIMEDELTA_|Show jobs created after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| -|_--sort COLUMNS_|Sort rows by specified column. Add "-" prefix to revert the sorting order. Multiple columns can be specified \(comma separated). \[default: cpu]| -|_\-t, --tag TAG_|Filter out jobs by tag \(multiple option)| -|_--timeout FLOAT_|Maximum allowed time for executing the command, 0 for no timeout \[default: 0]| -|_--until DATE\_OR_TIMEDELTA_|Show jobs created before a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| +|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| +|_\--full-uri_|Output full bucket URI.| +|_\--long-format_|Output all info about bucket.| -### neuro job save +### neuro blob lscredentials -Save job's state to an image.
+List bucket credentials. **Usage:** ```bash -neuro job save [OPTIONS] JOB IMAGE +neuro blob lscredentials [OPTIONS] ``` -**Examples:** +**Options:** -```bash +Name | Description| +|----|------------| +|_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| -neuro job save job-id image:ubuntu-patched -neuro job save my-favourite-job image:ubuntu-patched:v1 -neuro job save my-favourite-job image://bob/ubuntu-patched + + +### neuro blob mkbucket + +Create a new bucket. + +**Usage:** + +```bash +neuro blob mkbucket [OPTIONS] ``` **Options:** @@ -1188,18 +1214,21 @@ neuro job save my-favourite-job image://bob/ubuntu-patched Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Perform in a specified cluster \(the current cluster by default).| +|_--name NAME_|Optional bucket name| +|_--org ORG_|Perform in a specified org \(the current org by default).| -### neuro job browse +### neuro blob mkcredentials -Opens a job's URL in a web browser. +Create a new bucket credential. **Usage:** ```bash -neuro job browse [OPTIONS] JOB +neuro blob mkcredentials [OPTIONS] BUCKETS... ``` **Options:** @@ -1207,18 +1236,21 @@ neuro job browse [OPTIONS] JOB Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Perform in a specified cluster \(the current cluster by default).| +|_--name NAME_|Optional bucket credential name| +|_\--read-only_|Make read-only credential| -### neuro job attach +### neuro blob rm -Attach terminal to a job

Attach local standard input, output, and error streams to a running job. +Remove blobs from bucket. **Usage:** ```bash -neuro job attach [OPTIONS] JOB +neuro blob rm [OPTIONS] PATHS... ``` **Options:** @@ -1226,19 +1258,21 @@ neuro job attach [OPTIONS] JOB Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--port-forward LOCAL\_PORT:REMOTE_RORT_|Forward port\(s) of a running job to local port\(s) \(use multiple times for forwarding several ports)| +|_\--glob / --no-glob_|Expand glob patterns in PATHS \[default: glob]| +|_\-p, --progress / -P, --no-progress_|Show progress, on by default in TTY mode, off otherwise.| +|_\-r, --recursive_|remove directories and their contents recursively| -### neuro job bump-life-span +### neuro blob rmbucket -Increase job life span +Remove bucket BUCKET. **Usage:** ```bash -neuro job bump-life-span [OPTIONS] JOB TIMEDELTA +neuro blob rmbucket [OPTIONS] BUCKETS... ``` **Options:** @@ -1246,18 +1280,19 @@ neuro job bump-life-span [OPTIONS] JOB TIMEDELTA Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| -## neuro project +### neuro blob rmcredentials -Project operations. \(DEPRECATED) +Remove bucket credential BUCKET_CREDENTIAL. **Usage:** ```bash -neuro project [OPTIONS] COMMAND [ARGS]... +neuro blob rmcredentials [OPTIONS] CREDENTIALS... ``` **Options:** @@ -1265,38 +1300,27 @@ neuro project [OPTIONS] COMMAND [ARGS]... Name | Description| |----|------------| |_--help_|Show this message and exit.| - - -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro project init](#neuro-project-init)_| \(Deprecated) Initialize an empty project | +|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| -### neuro project init +### neuro blob set-bucket-publicity -Initialize an empty project.

\(DEPRECATED)
+Change public access settings for BUCKET
**Usage:** ```bash -neuro project init [OPTIONS] [NAME] +neuro blob set-bucket-publicity [OPTIONS] BUCKET {public|private} ``` **Examples:** ```bash -# Initializes a scaffolding for the new project with the recommended project -# structure (see http://github.com/neuro-inc/cookiecutter-neuro-project) -neuro project init - -# Initializes a scaffolding for the new project with the recommended project -# structure and sets the project name to 'my-project' -neuro project init my-project +neuro blob set-bucket-publicity my-bucket public +neuro blob set-bucket-publicity my-bucket private ``` @@ -1305,18 +1329,19 @@ neuro project init my-project Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| -## neuro storage +### neuro blob sign-url -Storage operations. +Make signed url for blob in bucket. **Usage:** ```bash -neuro storage [OPTIONS] COMMAND [ARGS]... +neuro blob sign-url [OPTIONS] PATH ``` **Options:** @@ -1324,62 +1349,40 @@ neuro storage [OPTIONS] COMMAND [ARGS]... Name | Description| |----|------------| |_--help_|Show this message and exit.| - - -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro storage cp](#neuro-storage-cp)_| Copy files and directories | -| _[neuro storage ls](#neuro-storage-ls)_| List directory contents | -| _[neuro storage glob](#neuro-storage-glob)_| List resources that match PATTERNS | -| _[neuro storage rm](#neuro-storage-rm)_| Remove files or directories | -| _[neuro storage mkdir](#neuro-storage-mkdir)_| Make directories | -| _[neuro storage mv](#neuro-storage-mv)_| Move or rename files and directories | -| _[neuro storage tree](#neuro-storage-tree)_| List storage in a tree-like format | -| _[neuro storage df](#neuro-storage-df)_| Show current usage of storage | +|_--expires TIMEDELTA_|Duration this signature will be valid in the format '1h2m3s' \[default: 1h]| -### neuro storage cp +### neuro blob statbucket -Copy files and directories.

Either SOURCES or DESTINATION should have storage:// scheme. If scheme is
omitted, file:// scheme is assumed.

Use /dev/stdin and /dev/stdout file names to copy a file from terminal and
print the content of file on the storage to console.

Any number of \--exclude and --include options can be passed. The filters that
appear later in the command take precedence over filters that appear earlier
in the command. If neither \--exclude nor --include options are specified the
default can be changed using the storage.cp-exclude configuration variable
documented in "neuro help user-config".
+Get bucket BUCKET. **Usage:** ```bash -neuro storage cp [OPTIONS] [SOURCES]... [DESTINATION] +neuro blob statbucket [OPTIONS] BUCKET ``` -**Examples:** +**Options:** -```bash +Name | Description| +|----|------------| +|_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| +|_\--full-uri_|Output full bucket URI.| -# copy local files into remote storage root -neuro cp foo.txt bar/baz.dat storage: -neuro cp foo.txt bar/baz.dat -t storage: -# copy local directory `foo` into existing remote directory `bar` -neuro cp -r foo -t storage:bar -# copy the content of local directory `foo` into existing remote -# directory `bar` -neuro cp -r -T storage:foo storage:bar -# download remote file `foo.txt` into local file `/tmp/foo.txt` with -# explicit file:// scheme set -neuro cp storage:foo.txt file:///tmp/foo.txt -neuro cp -T storage:foo.txt file:///tmp/foo.txt -neuro cp storage:foo.txt file:///tmp -neuro cp storage:foo.txt -t file:///tmp +### neuro blob statcredentials -# download other user's remote file into the current directory -neuro cp storage://{username}/foo.txt . +Get bucket credential BUCKET_CREDENTIAL. -# download only files with extension `.out` into the current directory -neuro cp storage:results/*.out . +**Usage:** +```bash +neuro blob statcredentials [OPTIONS] BUCKET_CREDENTIAL ``` **Options:** @@ -1387,28 +1390,19 @@ neuro cp storage:results/*.out . Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--continue_|Continue copying partially-copied files.| -|_\--exclude-from-files FILES_|A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp\-exclude-from-files configuration variable documented in "neuro help user-config"| -|_--exclude_|Exclude files and directories that match the specified pattern.| -|_--include_|Don't exclude files and directories that match the specified pattern.| -|_\--glob / --no-glob_|Expand glob patterns in SOURCES with explicit scheme. \[default: glob]| -|_\-T, --no-target-directory_|Treat DESTINATION as a normal file.| -|_\-p, --progress / -P, --no-progress_|Show progress, on by default in TTY mode, off otherwise.| -|_\-r, --recursive_|Recursive copy, off by default| -|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY.| -|_\-u, --update_|Copy only when the SOURCE file is newer than the destination file or when the destination file is missing.| +|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| -### neuro storage ls +## neuro completion -List directory contents.

By default PATH is equal user's home dir \(storage:) +Output shell completion code. **Usage:** ```bash -neuro storage ls [OPTIONS] [PATHS]... +neuro completion [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -1416,23 +1410,26 @@ neuro storage ls [OPTIONS] [PATHS]... Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-d, --directory_|list directories themselves, not their contents.| -|_-l_|use a long listing format.| -|_\-h, --human-readable_|with -l print human readable sizes \(e.g., 2K, 540M).| -|_\-a, --all_|do not ignore entries starting with .| -|_--sort \[name | size | time]_|sort by given field, default is name.| +**Commands:** + +|Usage|Description| +|---|---| +| _[neuro completion generate](#neuro-completion-generate)_| Show instructions for shell completion | +| _[neuro completion patch](#neuro-completion-patch)_| Patch shell profile to enable completion | + -### neuro storage glob -List resources that match PATTERNS. +### neuro completion generate + +Show instructions for shell completion. **Usage:** ```bash -neuro storage glob [OPTIONS] [PATTERNS]... +neuro completion generate [OPTIONS] {bash|zsh} ``` **Options:** @@ -1444,25 +1441,14 @@ Name | Description| -### neuro storage rm +### neuro completion patch -Remove files or directories.
+Patch shell profile to enable completion

Patches shell configuration while depending of current shell. Files patched:

bash: `~/.bashrc` zsh: `~/.zshrc` **Usage:** ```bash -neuro storage rm [OPTIONS] PATHS... -``` - -**Examples:** - -```bash - -neuro rm storage:foo/bar -neuro rm storage://{username}/foo/bar -neuro rm --recursive storage://{username}/foo/ -neuro rm storage:foo/**/*.tmp - +neuro completion patch [OPTIONS] {bash|zsh} ``` **Options:** @@ -1470,21 +1456,18 @@ neuro rm storage:foo/**/*.tmp Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--glob / --no-glob_|Expand glob patterns in PATHS \[default: glob]| -|_\-p, --progress / -P, --no-progress_|Show progress, on by default in TTY mode, off otherwise.| -|_\-r, --recursive_|remove directories and their contents recursively| -### neuro storage mkdir +## neuro config -Make directories. +Client configuration. **Usage:** ```bash -neuro storage mkdir [OPTIONS] PATHS... +neuro config [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -1492,43 +1475,54 @@ neuro storage mkdir [OPTIONS] PATHS... Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-p, --parents_|No error if existing, make parent directories as needed| + + +**Commands:** + +|Usage|Description| +|---|---| +| _[neuro config aliases](#neuro-config-aliases)_| List available command aliases | +| _[neuro config docker](#neuro-config-docker)_| Configure local docker client | +| _[neuro config get-clusters](#neuro-config-get-clusters)_| List available clusters/org pairs | +| _[neuro config login](#neuro-config-login)_| Log into Neuro Platform | +| _[neuro config login-headless](#neuro-config-login-headless)_| Log into Neuro Platform in non-GUI environ | +| _[neuro config login\-with-token](#neuro-config-login-with-token)_| Log into Neuro Platform with token | +| _[neuro config logout](#neuro-config-logout)_| Log out | +| _[neuro config show](#neuro-config-show)_| Print current settings | +| _[neuro config show-token](#neuro-config-show-token)_| Print current authorization token | +| _[neuro config switch-cluster](#neuro-config-switch-cluster)_| Switch the active cluster | +| _[neuro config switch-org](#neuro-config-switch-org)_| Switch the active organization | -### neuro storage mv +### neuro config aliases -Move or rename files and directories.

SOURCE must contain path to the file or directory existing on the storage, and
DESTINATION must contain the full path to the target file or directory.
+List available command aliases. **Usage:** ```bash -neuro storage mv [OPTIONS] [SOURCES]... [DESTINATION] +neuro config aliases [OPTIONS] ``` -**Examples:** +**Options:** -```bash +Name | Description| +|----|------------| +|_--help_|Show this message and exit.| -# move and rename remote file -neuro mv storage:foo.txt storage:bar/baz.dat -neuro mv -T storage:foo.txt storage:bar/baz.dat -# move remote files into existing remote directory -neuro mv storage:foo.txt storage:bar/baz.dat storage:dst -neuro mv storage:foo.txt storage:bar/baz.dat -t storage:dst -# move the content of remote directory into other existing -# remote directory -neuro mv -T storage:foo storage:bar -# move remote file into other user's directory -neuro mv storage:foo.txt storage://{username}/bar.dat +### neuro config docker -# move remote file from other user's directory -neuro mv storage://{username}/foo.txt storage:bar.dat +Configure local docker client

This command configures local docker client to use Neuro Platform's docker
registry. +**Usage:** + +```bash +neuro config docker [OPTIONS] ``` **Options:** @@ -1536,21 +1530,19 @@ neuro mv storage://{username}/foo.txt storage:bar.dat Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--glob / --no-glob_|Expand glob patterns in SOURCES \[default: glob]| -|_\-T, --no-target-directory_|Treat DESTINATION as a normal file| -|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY| +|_\--docker-config PATH_|Specifies the location of the Docker client configuration files| -### neuro storage tree +### neuro config get-clusters -List storage in a tree-like format

Tree is a recursive directory listing program that produces a depth indented
listing of files, which is colorized ala dircolors if the LS_COLORS
environment variable is set and output is to tty. With no arguments, tree
lists the files in the storage: directory. When directory arguments are
given, tree lists all the files and/or directories found in the given
directories each in turn. Upon completion of listing all files/directories
found, tree returns the total number of files and/or directories listed.

By default PATH is equal user's home dir \(storage:) +List available clusters/org pairs.

This command re-fetches cluster list and then displays each cluster with
available orgs. **Usage:** ```bash -neuro storage tree [OPTIONS] [PATH] +neuro config get-clusters [OPTIONS] ``` **Options:** @@ -1558,22 +1550,18 @@ neuro storage tree [OPTIONS] [PATH] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-h, --human-readable_|Print the size in a more human readable way.| -|_\-a, --all_|do not ignore entries starting with .| -|_\-s, --size_|Print the size in bytes of each file.| -|_--sort \[name | size | time]_|sort by given field, default is name| -### neuro storage df +### neuro config login -Show current usage of storage. +Log into Neuro Platform.

URL is a platform entrypoint URL. **Usage:** ```bash -neuro storage df [OPTIONS] +neuro config login [OPTIONS] [URL] ``` **Options:** @@ -1585,46 +1573,33 @@ Name | Description| -## neuro image +### neuro config login-headless -Container image operations. +Log into Neuro Platform in non-GUI environ

URL is a platform entrypoint URL.

The command works similar to "neuro login" but instead of opening a browser
for performing OAuth registration prints an URL that should be open on guest
host.

Then user inputs a code displayed in a browser after successful login back in
neuro command to finish the login process. **Usage:** ```bash -neuro image [OPTIONS] COMMAND [ARGS]... +neuro config login-headless [OPTIONS] [URL] ``` **Options:** Name | Description| |----|------------| -|_--help_|Show this message and exit.| - - -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro image ls](#neuro-image-ls)_| List images | -| _[neuro image push](#neuro-image-push)_| Push an image to platform registry | -| _[neuro image pull](#neuro-image-pull)_| Pull an image from platform registry | -| _[neuro image rm](#neuro-image-rm)_| Remove image from platform registry | -| _[neuro image size](#neuro-image-size)_| Get image size | -| _[neuro image digest](#neuro-image-digest)_| Get digest of an image from remote registry | -| _[neuro image tags](#neuro-image-tags)_| List tags for image in platform registry | +|_--help_|Show this message and exit.| -### neuro image ls +### neuro config login-with-token -List images. +Log into Neuro Platform with token.

TOKEN is authentication token provided by administration team. URL is a
platform entrypoint URL. **Usage:** ```bash -neuro image ls [OPTIONS] +neuro config login-with-token [OPTIONS] TOKEN [URL] ``` **Options:** @@ -1632,33 +1607,18 @@ neuro image ls [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Show images on a specified cluster \(the current cluster by default).| -|_-l_|List in long format.| -|_\--full-uri_|Output full image URI.| -|_\-n, --name PATTERN_|Filter out images by name regex.| -|_\-o, --owner TEXT_|Filter out images by owner \(multiple option). Supports `ME` option to filter by the current user.| -### neuro image push +### neuro config logout -Push an image to platform registry.

Remote image must be URL with image:// scheme. Image names can contain tag. If
tags not specified 'latest' will be used as value.
+Log out. **Usage:** ```bash -neuro image push [OPTIONS] LOCAL_IMAGE [REMOTE_IMAGE] -``` - -**Examples:** - -```bash - -neuro push myimage -neuro push alpine:latest image:my-alpine:production -neuro push alpine image://myfriend/alpine:shared - +neuro config logout [OPTIONS] ``` **Options:** @@ -1670,24 +1630,14 @@ Name | Description| -### neuro image pull +### neuro config show -Pull an image from platform registry.

Remote image name must be URL with image:// scheme. Image names can contain
tag.
+Print current settings. **Usage:** ```bash -neuro image pull [OPTIONS] REMOTE_IMAGE [LOCAL_IMAGE] -``` - -**Examples:** - -```bash - -neuro pull image:myimage -neuro pull image://myfriend/alpine:shared -neuro pull image://username/my-alpine:production alpine:from-registry - +neuro config show [OPTIONS] ``` **Options:** @@ -1699,23 +1649,14 @@ Name | Description| -### neuro image rm +### neuro config show-token -Remove image from platform registry.

Image name must be URL with image:// scheme. Image name must contain tag.
+Print current authorization token. **Usage:** ```bash -neuro image rm [OPTIONS] IMAGES... -``` - -**Examples:** - -```bash - -neuro image rm image://myfriend/alpine:shared -neuro image rm image:myimage:latest - +neuro config show-token [OPTIONS] ``` **Options:** @@ -1723,28 +1664,18 @@ neuro image rm image:myimage:latest Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_-f_|Force deletion of all tags referencing the image.| -### neuro image size +### neuro config switch-cluster -Get image size

Image name must be URL with image:// scheme. Image name must contain tag.
+Switch the active cluster.

CLUSTER_NAME is the cluster name to select. The interactive prompt is used if
the name is omitted \(default). **Usage:** ```bash -neuro image size [OPTIONS] IMAGE -``` - -**Examples:** - -```bash - -neuro image size image://myfriend/alpine:shared -neuro image size image:myimage:latest - +neuro config switch-cluster [OPTIONS] [CLUSTER_NAME] ``` **Options:** @@ -1756,23 +1687,33 @@ Name | Description| -### neuro image digest +### neuro config switch-org -Get digest of an image from remote registry

Image name must be URL with image:// scheme. Image name must contain tag.
+Switch the active organization.

ORG\_NAME is the organization name to select. Use literal "NO_ORG" to switch to
using current cluster directly instead of on behalf of some org. **Usage:** ```bash -neuro image digest [OPTIONS] IMAGE +neuro config switch-org [OPTIONS] ORG_NAME ``` -**Examples:** +**Options:** -```bash +Name | Description| +|----|------------| +|_--help_|Show this message and exit.| -neuro image digest image://myfriend/alpine:shared -neuro image digest image:myimage:latest + + +## neuro disk + +Operations with disks. + +**Usage:** + +```bash +neuro disk [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -1782,24 +1723,34 @@ Name | Description| |_--help_|Show this message and exit.| +**Commands:** + +|Usage|Description| +|---|---| +| _[neuro disk create](#neuro-disk-create)_| Create a disk | +| _[neuro disk get](#neuro-disk-get)_| Get disk DISK_ID | +| _[neuro disk ls](#neuro-disk-ls)_| List disks | +| _[neuro disk rm](#neuro-disk-rm)_| Remove disk DISK_ID | + + -### neuro image tags +### neuro disk create -List tags for image in platform registry.

Image name must be URL with image:// scheme.
+Create a disk

Create a disk with at least storage amount STORAGE.

To specify the amount, you can use the following suffixes: "kKMGTPEZY" To use
decimal quantities, append "b" or "B". For example: - 1K or 1k is 1024 bytes -
1Kb or 1KB is 1000 bytes - 20G is 20 * 2 ^ 30 bytes - 20Gb or 20GB is
20.000.000.000 bytes

Note that server can have big granularity \(for example, 1G) so it will
possibly round-up the amount you requested.
**Usage:** ```bash -neuro image tags [OPTIONS] IMAGE +neuro disk create [OPTIONS] STORAGE ``` **Examples:** ```bash -neuro image tags image://myfriend/alpine -neuro image tags -l image:myimage +neuro disk create 10G +neuro disk create 500M ``` @@ -1808,19 +1759,22 @@ neuro image tags -l image:myimage Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_-l_|List in long format, with image sizes.| +|_--cluster CLUSTER_|Perform in a specified cluster \(the current cluster by default).| +|_--name NAME_|Optional disk name| +|_--org ORG_|Perform in a specified org \(the current org by default).| +|_\--timeout-unused TIMEDELTA_|Optional disk lifetime limit after last usage in the format '1d2h3m4s' \(some parts may be missing). Set '0' to disable. Default value '1d' can be changed in the user config.| -## neuro config +### neuro disk get -Client configuration. +Get disk DISK_ID. **Usage:** ```bash -neuro config [OPTIONS] COMMAND [ARGS]... +neuro disk get [OPTIONS] DISK ``` **Options:** @@ -1828,35 +1782,20 @@ neuro config [OPTIONS] COMMAND [ARGS]... Name | Description| |----|------------| |_--help_|Show this message and exit.| - - -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro config login](#neuro-config-login)_| Log into Neuro Platform | -| _[neuro config login\-with-token](#neuro-config-login-with-token)_| Log into Neuro Platform with token | -| _[neuro config login-headless](#neuro-config-login-headless)_| Log into Neuro Platform in non-GUI environ | -| _[neuro config show](#neuro-config-show)_| Print current settings | -| _[neuro config show-token](#neuro-config-show-token)_| Print current authorization token | -| _[neuro config aliases](#neuro-config-aliases)_| List available command aliases | -| _[neuro config get-clusters](#neuro-config-get-clusters)_| List available clusters/org pairs | -| _[neuro config switch-cluster](#neuro-config-switch-cluster)_| Switch the active cluster | -| _[neuro config switch-org](#neuro-config-switch-org)_| Switch the active organization | -| _[neuro config docker](#neuro-config-docker)_| Configure local docker client | -| _[neuro config logout](#neuro-config-logout)_| Log out | +|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| +|_\--full-uri_|Output full disk URI.| -### neuro config login +### neuro disk ls -Log into Neuro Platform.

URL is a platform entrypoint URL. +List disks. **Usage:** ```bash -neuro config login [OPTIONS] [URL] +neuro disk ls [OPTIONS] ``` **Options:** @@ -1864,18 +1803,21 @@ neuro config login [OPTIONS] [URL] Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| +|_\--full-uri_|Output full disk URI.| +|_\--long-format_|Output all info about disk.| -### neuro config login-with-token +### neuro disk rm -Log into Neuro Platform with token.

TOKEN is authentication token provided by administration team. URL is a
platform entrypoint URL. +Remove disk DISK_ID. **Usage:** ```bash -neuro config login-with-token [OPTIONS] TOKEN [URL] +neuro disk rm [OPTIONS] DISKS... ``` **Options:** @@ -1883,18 +1825,19 @@ neuro config login-with-token [OPTIONS] TOKEN [URL] Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| -### neuro config login-headless +## neuro image -Log into Neuro Platform in non-GUI environ

URL is a platform entrypoint URL.

The command works similar to "neuro login" but instead of opening a browser
for performing OAuth registration prints an URL that should be open on guest
host.

Then user inputs a code displayed in a browser after successful login back in
neuro command to finish the login process. +Container image operations. **Usage:** ```bash -neuro config login-headless [OPTIONS] [URL] +neuro image [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -1904,16 +1847,38 @@ Name | Description| |_--help_|Show this message and exit.| +**Commands:** + +|Usage|Description| +|---|---| +| _[neuro image digest](#neuro-image-digest)_| Get digest of an image from remote registry | +| _[neuro image ls](#neuro-image-ls)_| List images | +| _[neuro image pull](#neuro-image-pull)_| Pull an image from platform registry | +| _[neuro image push](#neuro-image-push)_| Push an image to platform registry | +| _[neuro image rm](#neuro-image-rm)_| Remove image from platform registry | +| _[neuro image size](#neuro-image-size)_| Get image size | +| _[neuro image tags](#neuro-image-tags)_| List tags for image in platform registry | + + -### neuro config show +### neuro image digest -Print current settings. +Get digest of an image from remote registry

Image name must be URL with image:// scheme. Image name must contain tag.
**Usage:** ```bash -neuro config show [OPTIONS] +neuro image digest [OPTIONS] IMAGE +``` + +**Examples:** + +```bash + +neuro image digest image://myfriend/alpine:shared +neuro image digest image:myimage:latest + ``` **Options:** @@ -1925,14 +1890,14 @@ Name | Description| -### neuro config show-token +### neuro image ls -Print current authorization token. +List images. **Usage:** ```bash -neuro config show-token [OPTIONS] +neuro image ls [OPTIONS] ``` **Options:** @@ -1940,18 +1905,33 @@ neuro config show-token [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Show images on a specified cluster \(the current cluster by default).| +|_-l_|List in long format.| +|_\--full-uri_|Output full image URI.| +|_\-n, --name PATTERN_|Filter out images by name regex.| +|_\-o, --owner TEXT_|Filter out images by owner \(multiple option). Supports `ME` option to filter by the current user.| -### neuro config aliases +### neuro image pull -List available command aliases. +Pull an image from platform registry.

Remote image name must be URL with image:// scheme. Image names can contain
tag.
**Usage:** ```bash -neuro config aliases [OPTIONS] +neuro image pull [OPTIONS] REMOTE_IMAGE [LOCAL_IMAGE] +``` + +**Examples:** + +```bash + +neuro pull image:myimage +neuro pull image://myfriend/alpine:shared +neuro pull image://username/my-alpine:production alpine:from-registry + ``` **Options:** @@ -1963,14 +1943,24 @@ Name | Description| -### neuro config get-clusters +### neuro image push -List available clusters/org pairs.

This command re-fetches cluster list and then displays each cluster with
available orgs. +Push an image to platform registry.

Remote image must be URL with image:// scheme. Image names can contain tag. If
tags not specified 'latest' will be used as value.
**Usage:** ```bash -neuro config get-clusters [OPTIONS] +neuro image push [OPTIONS] LOCAL_IMAGE [REMOTE_IMAGE] +``` + +**Examples:** + +```bash + +neuro push myimage +neuro push alpine:latest image:my-alpine:production +neuro push alpine image://myfriend/alpine:shared + ``` **Options:** @@ -1982,14 +1972,23 @@ Name | Description| -### neuro config switch-cluster +### neuro image rm -Switch the active cluster.

CLUSTER_NAME is the cluster name to select. The interactive prompt is used if
the name is omitted \(default). +Remove image from platform registry.

Image name must be URL with image:// scheme. Image name must contain tag.
**Usage:** ```bash -neuro config switch-cluster [OPTIONS] [CLUSTER_NAME] +neuro image rm [OPTIONS] IMAGES... +``` + +**Examples:** + +```bash + +neuro image rm image://myfriend/alpine:shared +neuro image rm image:myimage:latest + ``` **Options:** @@ -1997,37 +1996,28 @@ neuro config switch-cluster [OPTIONS] [CLUSTER_NAME] Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_-f_|Force deletion of all tags referencing the image.| -### neuro config switch-org +### neuro image size -Switch the active organization.

ORG\_NAME is the organization name to select. Use literal "NO_ORG" to switch to
using current cluster directly instead of on behalf of some org. +Get image size

Image name must be URL with image:// scheme. Image name must contain tag.
**Usage:** ```bash -neuro config switch-org [OPTIONS] ORG_NAME +neuro image size [OPTIONS] IMAGE ``` -**Options:** - -Name | Description| -|----|------------| -|_--help_|Show this message and exit.| - - - - -### neuro config docker +**Examples:** -Configure local docker client

This command configures local docker client to use Neuro Platform's docker
registry. +```bash -**Usage:** +neuro image size image://myfriend/alpine:shared +neuro image size image:myimage:latest -```bash -neuro config docker [OPTIONS] ``` **Options:** @@ -2035,19 +2025,27 @@ neuro config docker [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--docker-config PATH_|Specifies the location of the Docker client configuration files| -### neuro config logout +### neuro image tags -Log out. +List tags for image in platform registry.

Image name must be URL with image:// scheme.
**Usage:** ```bash -neuro config logout [OPTIONS] +neuro image tags [OPTIONS] IMAGE +``` + +**Examples:** + +```bash + +neuro image tags image://myfriend/alpine +neuro image tags -l image:myimage + ``` **Options:** @@ -2055,18 +2053,19 @@ neuro config logout [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_-l_|List in long format, with image sizes.| -## neuro completion +## neuro job -Output shell completion code. +Job operations. **Usage:** ```bash -neuro completion [OPTIONS] COMMAND [ARGS]... +neuro job [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -2080,20 +2079,31 @@ Name | Description| |Usage|Description| |---|---| -| _[neuro completion generate](#neuro-completion-generate)_| Show instructions for shell completion | -| _[neuro completion patch](#neuro-completion-patch)_| Patch shell profile to enable completion | +| _[neuro job attach](#neuro-job-attach)_| Attach terminal to a job | +| _[neuro job browse](#neuro-job-browse)_| Opens a job's URL in a web browser | +| _[neuro job bump\-life-span](#neuro-job-bump-life-span)_| Increase job life span | +| _[neuro job exec](#neuro-job-exec)_| Execute command in a running job | +| _[neuro job generate\-run-command](#neuro-job-generate-run-command)_| Generate command that will rerun given job | +| _[neuro job kill](#neuro-job-kill)_| Kill job\(s) | +| _[neuro job logs](#neuro-job-logs)_| Print the logs for a job | +| _[neuro job ls](#neuro-job-ls)_| List all jobs | +| _[neuro job port-forward](#neuro-job-port-forward)_| Forward port\(s) of a job | +| _[neuro job run](#neuro-job-run)_| Run a job | +| _[neuro job save](#neuro-job-save)_| Save job's state to an image | +| _[neuro job status](#neuro-job-status)_| Display status of a job | +| _[neuro job top](#neuro-job-top)_| Display GPU/CPU/Memory usage | -### neuro completion generate +### neuro job attach -Show instructions for shell completion. +Attach terminal to a job

Attach local standard input, output, and error streams to a running job. **Usage:** ```bash -neuro completion generate [OPTIONS] {bash|zsh} +neuro job attach [OPTIONS] JOB ``` **Options:** @@ -2101,18 +2111,19 @@ neuro completion generate [OPTIONS] {bash|zsh} Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\--port-forward LOCAL\_PORT:REMOTE_RORT_|Forward port\(s) of a running job to local port\(s) \(use multiple times for forwarding several ports)| -### neuro completion patch +### neuro job browse -Patch shell profile to enable completion

Patches shell configuration while depending of current shell. Files patched:

bash: `~/.bashrc` zsh: `~/.zshrc` +Opens a job's URL in a web browser. **Usage:** ```bash -neuro completion patch [OPTIONS] {bash|zsh} +neuro job browse [OPTIONS] JOB ``` **Options:** @@ -2124,14 +2135,14 @@ Name | Description| -## neuro acl +### neuro job bump-life-span -Access Control List management. +Increase job life span **Usage:** ```bash -neuro acl [OPTIONS] COMMAND [ARGS]... +neuro job bump-life-span [OPTIONS] JOB TIMEDELTA ``` **Options:** @@ -2141,36 +2152,27 @@ Name | Description| |_--help_|Show this message and exit.| -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro acl grant](#neuro-acl-grant)_| Shares resource with another user | -| _[neuro acl revoke](#neuro-acl-revoke)_| Revoke user access from another user | -| _[neuro acl ls](#neuro-acl-ls)_| List shared resources | -| _[neuro acl add-role](#neuro-acl-add-role)_| Add new role | -| _[neuro acl remove-role](#neuro-acl-remove-role)_| Remove existing role | - - -### neuro acl grant +### neuro job exec -Shares resource with another user.

URI shared resource.

USER username to share resource with.

PERMISSION sharing access right: read, write, or manage.
+Execute command in a running job.
**Usage:** ```bash -neuro acl grant [OPTIONS] URI USER {read|write|manage} +neuro job exec [OPTIONS] JOB -- CMD... ``` **Examples:** ```bash -neuro acl grant storage:///sample_data/ alice manage -neuro acl grant image:resnet50 bob read -neuro acl grant job:///my_job_id alice write +# Provides a shell to the container: +neuro exec my-job -- /bin/bash + +# Executes a single command in the container and returns the control: +neuro exec --no-tty my-job -- ls -l ``` @@ -2179,27 +2181,27 @@ neuro acl grant job:///my_job_id alice write Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\-t, --tty / -T, --no-tty_|Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script.| -### neuro acl revoke +### neuro job generate-run-command -Revoke user access from another user.

URI previously shared resource to revoke.

USER to revoke URI resource from.
+Generate command that will rerun given job.
**Usage:** ```bash -neuro acl revoke [OPTIONS] URI USER +neuro job generate-run-command [OPTIONS] JOB ``` **Examples:** ```bash -neuro acl revoke storage:///sample_data/ alice -neuro acl revoke image:resnet50 bob -neuro acl revoke job:///my_job_id alice +# You can use the following to directly re-execute it: +eval $(neuro job generate-run-command ) ``` @@ -2212,25 +2214,14 @@ Name | Description| -### neuro acl ls +### neuro job kill -List shared resources.

The command displays a list of resources shared BY current user \(default).

To display a list of resources shared WITH current user apply --shared option.
+Kill job\(s). **Usage:** ```bash -neuro acl ls [OPTIONS] [URI] -``` - -**Examples:** - -```bash - -neuro acl list -neuro acl list storage:// -neuro acl list --shared -neuro acl list --shared image:// - +neuro job kill [OPTIONS] JOBS... ``` **Options:** @@ -2238,29 +2229,18 @@ neuro acl list --shared image:// Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--full-uri_|Output full URI.| -|_--shared_|Output the resources shared by the user.| -|_-u TEXT_|Use specified user or role.| -### neuro acl add-role +### neuro job logs -Add new role.
+Print the logs for a job. **Usage:** ```bash -neuro acl add-role [OPTIONS] ROLE_NAME -``` - -**Examples:** - -```bash - -neuro acl add-role mycompany/subdivision - +neuro job logs [OPTIONS] JOB ``` **Options:** @@ -2268,25 +2248,32 @@ neuro acl add-role mycompany/subdivision Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--since DATE\_OR_TIMEDELTA_|Only return logs after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| +|_--timestamps_|Include timestamps on each line in the log output.| -### neuro acl remove-role +### neuro job ls -Remove existing role.
+List all jobs.
**Usage:** ```bash -neuro acl remove-role [OPTIONS] ROLE_NAME +neuro job ls [OPTIONS] ``` **Examples:** ```bash -neuro acl remove-role mycompany/subdivision +neuro ps -a +neuro ps -a --owner=user-1 --owner=user-2 +neuro ps --name my-experiments-v1 -s failed -s succeeded +neuro ps --description=my favourite job +neuro ps -s failed -s succeeded -q +neuro ps -t tag1 -t tag2 ``` @@ -2295,81 +2282,51 @@ neuro acl remove-role mycompany/subdivision Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\-a, --all_|Show all jobs regardless the status.| +|_--cluster CLUSTER_|Show jobs on a specified cluster \(the current cluster by default).| +|_\-d, --description DESCRIPTION_|Filter out jobs by description \(exact match).| +|_--distinct_|Show only first job if names are same.| +|_--format COLUMNS_|Output table format, see "neuro help ps\-format" for more info about the format specification. The default can be changed using the job.ps-format configuration variable documented in "neuro help user-config"| +|_\--full-uri_|Output full image URI.| +|_\-n, --name NAME_|Filter out jobs by name.| +|_\-o, --owner TEXT_|Filter out jobs by owner \(multiple option). Supports `ME` option to filter by the current user.| +|_\--recent-first / --recent-last_|Show newer jobs first or last| +|_--since DATE\_OR_TIMEDELTA_|Show jobs created after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| +|_\-s, --status \[pending | suspended | running | succeeded | failed | cancelled]_|Filter out jobs by status \(multiple option).| +|_\-t, --tag TAG_|Filter out jobs by tag \(multiple option)| +|_--until DATE\_OR_TIMEDELTA_|Show jobs created before a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| +|_\-w, --wide_|Do not cut long lines for terminal width.| -## neuro blob +### neuro job port-forward -Blob storage operations. +Forward port\(s) of a job.

Forwards port\(s) of a running job to local port\(s).
**Usage:** ```bash -neuro blob [OPTIONS] COMMAND [ARGS]... +neuro job port-forward [OPTIONS] JOB LOCAL_PORT:REMOTE_RORT... ``` -**Options:** - -Name | Description| -|----|------------| -|_--help_|Show this message and exit.| - - -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro blob lsbucket](#neuro-blob-lsbucket)_| List buckets | -| _[neuro blob mkbucket](#neuro-blob-mkbucket)_| Create a new bucket | -| _[neuro blob importbucket](#neuro-blob-importbucket)_| Import an existing bucket | -| _[neuro blob statbucket](#neuro-blob-statbucket)_| Get bucket BUCKET | -| _[neuro blob rmbucket](#neuro-blob-rmbucket)_| Remove bucket BUCKET | -| _[neuro blob set\-bucket-publicity](#neuro-blob-set-bucket-publicity)_| Change public access settings for BUCKET | -| _[neuro blob lscredentials](#neuro-blob-lscredentials)_| List bucket credentials | -| _[neuro blob mkcredentials](#neuro-blob-mkcredentials)_| Create a new bucket credential | -| _[neuro blob statcredentials](#neuro-blob-statcredentials)_| Get bucket credential BUCKET_CREDENTIAL | -| _[neuro blob rmcredentials](#neuro-blob-rmcredentials)_| Remove bucket credential BUCKET_CREDENTIAL | -| _[neuro blob cp](#neuro-blob-cp)_| Copy blobs into and from Blob Storage | -| _[neuro blob ls](#neuro-blob-ls)_| List buckets or bucket contents | -| _[neuro blob glob](#neuro-blob-glob)_| List resources that match PATTERNS | -| _[neuro blob rm](#neuro-blob-rm)_| Remove blobs from bucket | -| _[neuro blob sign-url](#neuro-blob-sign-url)_| Make signed url for blob in bucket | -| _[neuro blob du](#neuro-blob-du)_| Get storage usage for BUCKET | - - - - -### neuro blob lsbucket - -List buckets. - -**Usage:** +**Examples:** ```bash -neuro blob lsbucket [OPTIONS] -``` - -**Options:** - -Name | Description| -|----|------------| -|_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| -|_\--full-uri_|Output full bucket URI.| -|_\--long-format_|Output all info about bucket.| - - - -### neuro blob mkbucket - -Create a new bucket. +# Forward local port 2080 to port 80 of job's container. +# You can use http://localhost:2080 in browser to access job's served http +neuro job port-forward my-fastai-job 2080:80 -**Usage:** +# Forward local port 2222 to job's port 22 +# Then copy all data from container's folder '/data' to current folder +# (please run second command in other terminal) +neuro job port-forward my-job-with-ssh-server 2222:22 +rsync -avxzhe ssh -p 2222 root@localhost:/data . + +# Forward few ports at once +neuro job port-forward my-job 2080:80 2222:22 2000:100 -```bash -neuro blob mkbucket [OPTIONS] ``` **Options:** @@ -2377,21 +2334,35 @@ neuro blob mkbucket [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Perform in a specified cluster \(the current cluster by default).| -|_--name NAME_|Optional bucket name| -|_--org ORG_|Perform in a specified org \(the current org by default).| -### neuro blob importbucket +### neuro job run -Import an existing bucket. +Run a job

IMAGE docker image name to run in a job.

CMD list will be passed as arguments to the executed job's image.
**Usage:** ```bash -neuro blob importbucket [OPTIONS] +neuro job run [OPTIONS] IMAGE [-- CMD...] +``` + +**Examples:** + +```bash + +# Starts a container pytorch:latest on a machine with smaller GPU resources +# (see exact values in `neuro config show`) and with two volumes mounted: +# storage:/ --> /var/storage/home (in read-write mode), +# storage:/neuromation/public --> /var/storage/neuromation (in read-only mode). +neuro run --preset=gpu-small --volume=storage::/var/storage/home:rw \ +--volume=storage:/neuromation/public:/var/storage/home:ro pytorch:latest + +# Starts a container using the custom image my-ubuntu:latest stored in neuro +# registry, run /script.sh and pass arg1 and arg2 as its arguments: +neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 arg2 + ``` **Options:** @@ -2399,31 +2370,54 @@ neuro blob importbucket [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--aws-access-key-id AWS\_ACCESS_KEY_ID_|AWS access\_key_id to use to access the bucket. Required when PROVIDER is 'aws'| -|_\--aws-endpoint-url AWS_ENDPOINT_|AWS endpoint to use to access the bucket. Usually you need to set this if you use non-AWS S3 compatible provider| -|_\--aws-region-name AWS_REGION_|AWS region to use to access the bucket.| -|_\--aws-secret-access-key AWS\_SECRET_ACCESS_KEY_|AWS secret\_access_key to use to access the bucket. Required when PROVIDER is 'aws'| -|_\--azure-storage-account-url AZURE\_STORAGE_ACCOUNT_URL_|Azure account url. Usually it has following format: https://.blob.core.windows.net Required when PROVIDER is 'azure'| -|_\--azure-storage-credential AZURE\_STORAGE_CREDENTIAL_|Azure storage credential that grants access to imported bucket. Either this or AZURE_SAS is required when PROVIDER is 'azure'| -|_\--azure-storage-sas-token AZURE_SAS_|Azure shared access signature token that grants access to imported bucket. Either this or AZURE\_STORAGE_CREDENTIAL is required when PROVIDER is 'azure'| -|_--cluster CLUSTER_|Perform in a specified cluster \(the current cluster by default).| -|_\--gcp-sa-credential GCP\_SA_CREDNETIAL_|GCP service account credential in form of base64 encoded json string that grants access to imported bucket. Required when PROVIDER is 'gcp'| -|_--name NAME_|Optional bucket name| -|_--org ORG_|Perform in a specified org \(the current org by default).| -|_--provider PROVIDER_|Bucket provider that hosts bucket \[required]| -|_\--provider-bucket-name EXTERNAL_NAME_|Name of bucket \(or container in case of Azure) inside the provider \[required]| +|_--browse_|Open a job's URL in a web browser| +|_--cluster CLUSTER_|Run job in a specified cluster| +|_\-d, --description DESC_|Optional job description in free format| +|_--detach_|Don't attach to job logs and don't wait for exit code| +|_--entrypoint TEXT_|Executable entrypoint in the container \(note that it overwrites `ENTRYPOINT` and `CMD` instructions of the docker image)| +|_\-e, --env VAR=VAL_|Set environment variable in container. Use multiple options to define more than one variable. See `neuro help secrets` for information about passing secrets as environment variables.| +|_\--env-file PATH_|File with environment variables to pass| +|_\-x, --extshm / -X, --no-extshm_|Request extended '/dev/shm' space \[default: x]| +|_--http PORT_|Enable HTTP port forwarding to container \[default: 80]| +|_\--http-auth / --no-http-auth_|Enable HTTP authentication for forwarded HTTP port \[default: True]| +|_\--life-span TIMEDELTA_|Optional job run-time limit in the format '1d2h3m4s' \(some parts may be missing). Set '0' to disable. Default value '1d' can be changed in the user config.| +|_\-n, --name NAME_|Optional job name| +|_--org ORG_|Run job in a specified org| +|_\--pass-config / --no-pass-config_|Upload neuro config to the job \[default: no\-pass-config]| +|_\--port-forward LOCAL\_PORT:REMOTE_RORT_|Forward port\(s) of a running job to local port\(s) \(use multiple times for forwarding several ports)| +|_\-s, --preset PRESET_|Predefined resource configuration \(to see available values, run `neuro config show`)| +|_--privileged_|Run job in privileged mode, if it is supported by cluster. \[default: False]| +|_\--restart \[never | on-failure | always]_|Restart policy to apply when a job exits \[default: never]| +|_\--schedule-timeout TIMEDELTA_|Optional job schedule timeout in the format '3m4s' \(some parts may be missing).| +|_--share USER_|Share job write permissions to user or role.| +|_--tag TAG_|Optional job tag, multiple values allowed| +|_\-t, --tty / -T, --no-tty_|Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script.| +|_\-v, --volume MOUNT_|Mounts directory from vault into container. Use multiple options to mount more than one volume. See `neuro help secrets` for information about passing secrets as mounted files.| +|_\--wait-for-seat / --no-wait-for-seat_|Wait for total running jobs quota \[default: no\-wait-for-seat]| +|_\--wait-start / --no-wait-start_|Wait for a job start or failure \[default: wait-start]| +|_\-w, --workdir TEXT_|Working directory inside the container| -### neuro blob statbucket +### neuro job save -Get bucket BUCKET. +Save job's state to an image.
**Usage:** ```bash -neuro blob statbucket [OPTIONS] BUCKET +neuro job save [OPTIONS] JOB IMAGE +``` + +**Examples:** + +```bash + +neuro job save job-id image:ubuntu-patched +neuro job save my-favourite-job image:ubuntu-patched:v1 +neuro job save my-favourite-job image://bob/ubuntu-patched + ``` **Options:** @@ -2431,20 +2425,18 @@ neuro blob statbucket [OPTIONS] BUCKET Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| -|_\--full-uri_|Output full bucket URI.| -### neuro blob rmbucket +### neuro job status -Remove bucket BUCKET. +Display status of a job. **Usage:** ```bash -neuro blob rmbucket [OPTIONS] BUCKETS... +neuro job status [OPTIONS] JOB ``` **Options:** @@ -2452,27 +2444,30 @@ neuro blob rmbucket [OPTIONS] BUCKETS... Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| +|_\--full-uri_|Output full URI.| -### neuro blob set-bucket-publicity +### neuro job top -Change public access settings for BUCKET
+Display GPU/CPU/Memory usage.
**Usage:** ```bash -neuro blob set-bucket-publicity [OPTIONS] BUCKET {public|private} +neuro job top [OPTIONS] [JOBS]... ``` **Examples:** ```bash -neuro blob set-bucket-publicity my-bucket public -neuro blob set-bucket-publicity my-bucket private +neuro top +neuro top job-1 job-2 +neuro top --owner=user-1 --owner=user-2 +neuro top --name my-experiments-v1 +neuro top -t tag1 -t tag2 ``` @@ -2481,19 +2476,29 @@ neuro blob set-bucket-publicity my-bucket private Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| +|_--cluster CLUSTER_|Show jobs on a specified cluster \(the current cluster by default).| +|_\-d, --description DESCRIPTION_|Filter out jobs by description \(exact match).| +|_--format COLUMNS_|Output table format, see "neuro help top\-format" for more info about the format specification. The default can be changed using the job.top-format configuration variable documented in "neuro help user-config"| +|_\--full-uri_|Output full image URI.| +|_\-n, --name NAME_|Filter out jobs by name.| +|_\-o, --owner TEXT_|Filter out jobs by owner \(multiple option). Supports `ME` option to filter by the current user. Specify `ALL` to show jobs of all users.| +|_--since DATE\_OR_TIMEDELTA_|Show jobs created after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| +|_--sort COLUMNS_|Sort rows by specified column. Add "-" prefix to revert the sorting order. Multiple columns can be specified \(comma separated). \[default: cpu]| +|_\-t, --tag TAG_|Filter out jobs by tag \(multiple option)| +|_--timeout FLOAT_|Maximum allowed time for executing the command, 0 for no timeout \[default: 0]| +|_--until DATE\_OR_TIMEDELTA_|Show jobs created before a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| -### neuro blob lscredentials +## neuro project -List bucket credentials. +Project operations. \(DEPRECATED) **Usage:** ```bash -neuro blob lscredentials [OPTIONS] +neuro project [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -2501,19 +2506,39 @@ neuro blob lscredentials [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| + + +**Commands:** + +|Usage|Description| +|---|---| +| _[neuro project init](#neuro-project-init)_| \(Deprecated) Initialize an empty project | -### neuro blob mkcredentials +### neuro project init -Create a new bucket credential. +Initialize an empty project.

\(DEPRECATED)
**Usage:** ```bash -neuro blob mkcredentials [OPTIONS] BUCKETS... +neuro project init [OPTIONS] [NAME] +``` + +**Examples:** + +```bash + +# Initializes a scaffolding for the new project with the recommended project +# structure (see http://github.com/neuro-inc/cookiecutter-neuro-project) +neuro project init + +# Initializes a scaffolding for the new project with the recommended project +# structure and sets the project name to 'my-project' +neuro project init my-project + ``` **Options:** @@ -2521,21 +2546,18 @@ neuro blob mkcredentials [OPTIONS] BUCKETS... Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Perform in a specified cluster \(the current cluster by default).| -|_--name NAME_|Optional bucket credential name| -|_\--read-only_|Make read-only credential| -### neuro blob statcredentials +## neuro secret -Get bucket credential BUCKET_CREDENTIAL. +Operations with secrets. **Usage:** ```bash -neuro blob statcredentials [OPTIONS] BUCKET_CREDENTIAL +neuro secret [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -2543,19 +2565,36 @@ neuro blob statcredentials [OPTIONS] BUCKET_CREDENTIAL Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| +**Commands:** +|Usage|Description| +|---|---| +| _[neuro secret add](#neuro-secret-add)_| Add secret KEY with data VALUE | +| _[neuro secret ls](#neuro-secret-ls)_| List secrets | +| _[neuro secret rm](#neuro-secret-rm)_| Remove secret KEY | -### neuro blob rmcredentials -Remove bucket credential BUCKET_CREDENTIAL. + + +### neuro secret add + +Add secret KEY with data VALUE.

If VALUE starts with @ it points to a file with secrets content.
**Usage:** ```bash -neuro blob rmcredentials [OPTIONS] CREDENTIALS... +neuro secret add [OPTIONS] KEY VALUE +``` + +**Examples:** + +```bash + +neuro secret add KEY_NAME VALUE +neuro secret add KEY_NAME @path/to/file.txt + ``` **Options:** @@ -2564,18 +2603,19 @@ Name | Description| |----|------------| |_--help_|Show this message and exit.| |_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| +|_--org ORG_|Look on a specified org \(the current org by default).| -### neuro blob cp +### neuro secret ls -Copy blobs into and from Blob Storage.

Either SOURCES or DESTINATION should have `blob://` scheme. If scheme is
omitted, file:// scheme is assumed. It is currently not possible to copy files
between Blob Storage \(`blob://`) destination, nor with `storage://` scheme
paths.

Use `/dev/stdin` and `/dev/stdout` file names to upload a file from standard
input or output to stdout.

Any number of \--exclude and --include options can be passed. The filters that
appear later in the command take precedence over filters that appear earlier
in the command. If neither \--exclude nor --include options are specified the
default can be changed using the storage.cp-exclude configuration variable
documented in "neuro help user-config".

File permissions, modification times and other attributes will not be passed
to Blob Storage metadata during upload. +List secrets. **Usage:** ```bash -neuro blob cp [OPTIONS] [SOURCES]... [DESTINATION] +neuro secret ls [OPTIONS] ``` **Options:** @@ -2583,28 +2623,20 @@ neuro blob cp [OPTIONS] [SOURCES]... [DESTINATION] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--continue_|Continue copying partially-copied files. Only for copying from Blob Storage.| -|_\--exclude-from-files FILES_|A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp\-exclude-from-files configuration variable documented in "neuro help user-config"| -|_--exclude_|Exclude files and directories that match the specified pattern.| -|_--include_|Don't exclude files and directories that match the specified pattern.| -|_\--glob / --no-glob_|Expand glob patterns in SOURCES with explicit scheme. \[default: glob]| -|_\-T, --no-target-directory_|Treat DESTINATION as a normal file.| -|_\-p, --progress / -P, --no-progress_|Show progress, on by default.| -|_\-r, --recursive_|Recursive copy, off by default| -|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY.| -|_\-u, --update_|Copy only when the SOURCE file is newer than the destination file or when the destination file is missing.| +|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| +|_\--full-uri_|Output full disk URI.| -### neuro blob ls +### neuro secret rm -List buckets or bucket contents. +Remove secret KEY. **Usage:** ```bash -neuro blob ls [OPTIONS] [PATHS]... +neuro secret rm [OPTIONS] KEY ``` **Options:** @@ -2612,22 +2644,20 @@ neuro blob ls [OPTIONS] [PATHS]... Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_-l_|use a long listing format.| -|_\--full-uri_|Output full bucket URI.| -|_\-h, --human-readable_|with -l print human readable sizes \(e.g., 2K, 540M).| -|_\-r, --recursive_|List all keys under the URL path provided, not just 1 level depths.| +|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| +|_--org ORG_|Look on a specified org \(the current org by default).| -### neuro blob glob +## neuro service-account -List resources that match PATTERNS. +Operations with service accounts. **Usage:** ```bash -neuro blob glob [OPTIONS] [PATTERNS]... +neuro service-account [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -2635,19 +2665,28 @@ neuro blob glob [OPTIONS] [PATTERNS]... Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--full-uri_|Output full bucket URI.| +**Commands:** + +|Usage|Description| +|---|---| +| _[neuro service-account create](#neuro-service-account-create)_| Create a service account | +| _[neuro service-account get](#neuro-service-account-get)_| Get service account SERVICE_ACCOUNT | +| _[neuro service-account ls](#neuro-service-account-ls)_| List service accounts | +| _[neuro service-account rm](#neuro-service-account-rm)_| Remove service accounts SERVICE_ACCOUNT | -### neuro blob rm -Remove blobs from bucket. + +### neuro service-account create + +Create a service account. **Usage:** ```bash -neuro blob rm [OPTIONS] PATHS... +neuro service-account create [OPTIONS] ``` **Options:** @@ -2655,21 +2694,20 @@ neuro blob rm [OPTIONS] PATHS... Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--glob / --no-glob_|Expand glob patterns in PATHS \[default: glob]| -|_\-p, --progress / -P, --no-progress_|Show progress, on by default in TTY mode, off otherwise.| -|_\-r, --recursive_|remove directories and their contents recursively| +|_\--default-cluster CLUSTER_NAME_|Service account default cluster. Current cluster will be used if not specified| +|_--name NAME_|Optional service account name| -### neuro blob sign-url +### neuro service-account get -Make signed url for blob in bucket. +Get service account SERVICE_ACCOUNT. **Usage:** ```bash -neuro blob sign-url [OPTIONS] PATH +neuro service-account get [OPTIONS] SERVICE_ACCOUNT ``` **Options:** @@ -2677,19 +2715,18 @@ neuro blob sign-url [OPTIONS] PATH Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--expires TIMEDELTA_|Duration this signature will be valid in the format '1h2m3s' \[default: 1h]| -### neuro blob du +### neuro service-account ls -Get storage usage for BUCKET. +List service accounts. **Usage:** ```bash -neuro blob du [OPTIONS] BUCKET +neuro service-account ls [OPTIONS] ``` **Options:** @@ -2697,19 +2734,18 @@ neuro blob du [OPTIONS] BUCKET Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| -## neuro secret +### neuro service-account rm -Operations with secrets. +Remove service accounts SERVICE_ACCOUNT. **Usage:** ```bash -neuro secret [OPTIONS] COMMAND [ARGS]... +neuro service-account rm [OPTIONS] SERVICE_ACCOUNTS... ``` **Options:** @@ -2719,25 +2755,16 @@ Name | Description| |_--help_|Show this message and exit.| -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro secret ls](#neuro-secret-ls)_| List secrets | -| _[neuro secret add](#neuro-secret-add)_| Add secret KEY with data VALUE | -| _[neuro secret rm](#neuro-secret-rm)_| Remove secret KEY | - - -### neuro secret ls +## neuro storage -List secrets. +Storage operations. **Usage:** ```bash -neuro secret ls [OPTIONS] +neuro storage [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -2745,50 +2772,62 @@ neuro secret ls [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| -|_\--full-uri_|Output full disk URI.| + + +**Commands:** + +|Usage|Description| +|---|---| +| _[neuro storage cp](#neuro-storage-cp)_| Copy files and directories | +| _[neuro storage df](#neuro-storage-df)_| Show current usage of storage | +| _[neuro storage glob](#neuro-storage-glob)_| List resources that match PATTERNS | +| _[neuro storage ls](#neuro-storage-ls)_| List directory contents | +| _[neuro storage mkdir](#neuro-storage-mkdir)_| Make directories | +| _[neuro storage mv](#neuro-storage-mv)_| Move or rename files and directories | +| _[neuro storage rm](#neuro-storage-rm)_| Remove files or directories | +| _[neuro storage tree](#neuro-storage-tree)_| List storage in a tree-like format | -### neuro secret add +### neuro storage cp -Add secret KEY with data VALUE.

If VALUE starts with @ it points to a file with secrets content.
+Copy files and directories.

Either SOURCES or DESTINATION should have storage:// scheme. If scheme is
omitted, file:// scheme is assumed.

Use /dev/stdin and /dev/stdout file names to copy a file from terminal and
print the content of file on the storage to console.

Any number of \--exclude and --include options can be passed. The filters that
appear later in the command take precedence over filters that appear earlier
in the command. If neither \--exclude nor --include options are specified the
default can be changed using the storage.cp-exclude configuration variable
documented in "neuro help user-config".
**Usage:** ```bash -neuro secret add [OPTIONS] KEY VALUE +neuro storage cp [OPTIONS] [SOURCES]... [DESTINATION] ``` **Examples:** ```bash -neuro secret add KEY_NAME VALUE -neuro secret add KEY_NAME @path/to/file.txt - -``` - -**Options:** - -Name | Description| -|----|------------| -|_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| -|_--org ORG_|Look on a specified org \(the current org by default).| - +# copy local files into remote storage root +neuro cp foo.txt bar/baz.dat storage: +neuro cp foo.txt bar/baz.dat -t storage: +# copy local directory `foo` into existing remote directory `bar` +neuro cp -r foo -t storage:bar +# copy the content of local directory `foo` into existing remote +# directory `bar` +neuro cp -r -T storage:foo storage:bar -### neuro secret rm +# download remote file `foo.txt` into local file `/tmp/foo.txt` with +# explicit file:// scheme set +neuro cp storage:foo.txt file:///tmp/foo.txt +neuro cp -T storage:foo.txt file:///tmp/foo.txt +neuro cp storage:foo.txt file:///tmp +neuro cp storage:foo.txt -t file:///tmp -Remove secret KEY. +# download other user's remote file into the current directory +neuro cp storage://{username}/foo.txt . -**Usage:** +# download only files with extension `.out` into the current directory +neuro cp storage:results/*.out . -```bash -neuro secret rm [OPTIONS] KEY ``` **Options:** @@ -2796,20 +2835,28 @@ neuro secret rm [OPTIONS] KEY Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| -|_--org ORG_|Look on a specified org \(the current org by default).| +|_--continue_|Continue copying partially-copied files.| +|_\--exclude-from-files FILES_|A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp\-exclude-from-files configuration variable documented in "neuro help user-config"| +|_--exclude_|Exclude files and directories that match the specified pattern.| +|_--include_|Don't exclude files and directories that match the specified pattern.| +|_\--glob / --no-glob_|Expand glob patterns in SOURCES with explicit scheme. \[default: glob]| +|_\-T, --no-target-directory_|Treat DESTINATION as a normal file.| +|_\-p, --progress / -P, --no-progress_|Show progress, on by default in TTY mode, off otherwise.| +|_\-r, --recursive_|Recursive copy, off by default| +|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY.| +|_\-u, --update_|Copy only when the SOURCE file is newer than the destination file or when the destination file is missing.| -## neuro disk +### neuro storage df -Operations with disks. +Show current usage of storage. **Usage:** ```bash -neuro disk [OPTIONS] COMMAND [ARGS]... +neuro storage df [OPTIONS] ``` **Options:** @@ -2819,26 +2866,16 @@ Name | Description| |_--help_|Show this message and exit.| -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro disk ls](#neuro-disk-ls)_| List disks | -| _[neuro disk create](#neuro-disk-create)_| Create a disk | -| _[neuro disk get](#neuro-disk-get)_| Get disk DISK_ID | -| _[neuro disk rm](#neuro-disk-rm)_| Remove disk DISK_ID | - - -### neuro disk ls +### neuro storage glob -List disks. +List resources that match PATTERNS. **Usage:** ```bash -neuro disk ls [OPTIONS] +neuro storage glob [OPTIONS] [PATTERNS]... ``` **Options:** @@ -2846,30 +2883,18 @@ neuro disk ls [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| -|_\--full-uri_|Output full disk URI.| -|_\--long-format_|Output all info about disk.| -### neuro disk create +### neuro storage ls -Create a disk

Create a disk with at least storage amount STORAGE.

To specify the amount, you can use the following suffixes: "kKMGTPEZY" To use
decimal quantities, append "b" or "B". For example: - 1K or 1k is 1024 bytes -
1Kb or 1KB is 1000 bytes - 20G is 20 * 2 ^ 30 bytes - 20Gb or 20GB is
20.000.000.000 bytes

Note that server can have big granularity \(for example, 1G) so it will
possibly round-up the amount you requested.
+List directory contents.

By default PATH is equal user's home dir \(storage:) **Usage:** ```bash -neuro disk create [OPTIONS] STORAGE -``` - -**Examples:** - -```bash - -neuro disk create 10G -neuro disk create 500M - +neuro storage ls [OPTIONS] [PATHS]... ``` **Options:** @@ -2877,22 +2902,23 @@ neuro disk create 500M Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Perform in a specified cluster \(the current cluster by default).| -|_--name NAME_|Optional disk name| -|_--org ORG_|Perform in a specified org \(the current org by default).| -|_\--timeout-unused TIMEDELTA_|Optional disk lifetime limit after last usage in the format '1d2h3m4s' \(some parts may be missing). Set '0' to disable. Default value '1d' can be changed in the user config.| +|_\-d, --directory_|list directories themselves, not their contents.| +|_-l_|use a long listing format.| +|_\-h, --human-readable_|with -l print human readable sizes \(e.g., 2K, 540M).| +|_\-a, --all_|do not ignore entries starting with .| +|_--sort \[name | size | time]_|sort by given field, default is name.| -### neuro disk get +### neuro storage mkdir -Get disk DISK_ID. +Make directories. **Usage:** ```bash -neuro disk get [OPTIONS] DISK +neuro storage mkdir [OPTIONS] PATHS... ``` **Options:** @@ -2900,40 +2926,43 @@ neuro disk get [OPTIONS] DISK Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Look on a specified cluster \(the current cluster by default).| -|_\--full-uri_|Output full disk URI.| +|_\-p, --parents_|No error if existing, make parent directories as needed| -### neuro disk rm +### neuro storage mv -Remove disk DISK_ID. +Move or rename files and directories.

SOURCE must contain path to the file or directory existing on the storage, and
DESTINATION must contain the full path to the target file or directory.
**Usage:** ```bash -neuro disk rm [OPTIONS] DISKS... +neuro storage mv [OPTIONS] [SOURCES]... [DESTINATION] ``` -**Options:** - -Name | Description| -|----|------------| -|_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Perform on a specified cluster \(the current cluster by default).| +**Examples:** +```bash +# move and rename remote file +neuro mv storage:foo.txt storage:bar/baz.dat +neuro mv -T storage:foo.txt storage:bar/baz.dat +# move remote files into existing remote directory +neuro mv storage:foo.txt storage:bar/baz.dat storage:dst +neuro mv storage:foo.txt storage:bar/baz.dat -t storage:dst -## neuro service-account +# move the content of remote directory into other existing +# remote directory +neuro mv -T storage:foo storage:bar -Operations with service accounts. +# move remote file into other user's directory +neuro mv storage:foo.txt storage://{username}/bar.dat -**Usage:** +# move remote file from other user's directory +neuro mv storage://{username}/foo.txt storage:bar.dat -```bash -neuro service-account [OPTIONS] COMMAND [ARGS]... ``` **Options:** @@ -2941,28 +2970,32 @@ neuro service-account [OPTIONS] COMMAND [ARGS]... Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\--glob / --no-glob_|Expand glob patterns in SOURCES \[default: glob]| +|_\-T, --no-target-directory_|Treat DESTINATION as a normal file| +|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY| -**Commands:** - -|Usage|Description| -|---|---| -| _[neuro service-account ls](#neuro-service-account-ls)_| List service accounts | -| _[neuro service-account create](#neuro-service-account-create)_| Create a service account | -| _[neuro service-account get](#neuro-service-account-get)_| Get service account SERVICE_ACCOUNT | -| _[neuro service-account rm](#neuro-service-account-rm)_| Remove service accounts SERVICE_ACCOUNT | +### neuro storage rm +Remove files or directories.
-### neuro service-account ls +**Usage:** -List service accounts. +```bash +neuro storage rm [OPTIONS] PATHS... +``` -**Usage:** +**Examples:** ```bash -neuro service-account ls [OPTIONS] + +neuro rm storage:foo/bar +neuro rm storage://{username}/foo/bar +neuro rm --recursive storage://{username}/foo/ +neuro rm storage:foo/**/*.tmp + ``` **Options:** @@ -2970,18 +3003,21 @@ neuro service-account ls [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\--glob / --no-glob_|Expand glob patterns in PATHS \[default: glob]| +|_\-p, --progress / -P, --no-progress_|Show progress, on by default in TTY mode, off otherwise.| +|_\-r, --recursive_|remove directories and their contents recursively| -### neuro service-account create +### neuro storage tree -Create a service account. +List storage in a tree-like format

Tree is a recursive directory listing program that produces a depth indented
listing of files, which is colorized ala dircolors if the LS_COLORS
environment variable is set and output is to tty. With no arguments, tree
lists the files in the storage: directory. When directory arguments are
given, tree lists all the files and/or directories found in the given
directories each in turn. Upon completion of listing all files/directories
found, tree returns the total number of files and/or directories listed.

By default PATH is equal user's home dir \(storage:) **Usage:** ```bash -neuro service-account create [OPTIONS] +neuro storage tree [OPTIONS] [PATH] ``` **Options:** @@ -2989,20 +3025,22 @@ neuro service-account create [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--default-cluster CLUSTER_NAME_|Service account default cluster. Current cluster will be used if not specified| -|_--name NAME_|Optional service account name| +|_\-h, --human-readable_|Print the size in a more human readable way.| +|_\-a, --all_|do not ignore entries starting with .| +|_\-s, --size_|Print the size in bytes of each file.| +|_--sort \[name | size | time]_|sort by given field, default is name| -### neuro service-account get +## neuro attach -Get service account SERVICE_ACCOUNT. +Attach terminal to a job

Attach local standard input, output, and error streams to a running job. **Usage:** ```bash -neuro service-account get [OPTIONS] SERVICE_ACCOUNT +neuro attach [OPTIONS] JOB ``` **Options:** @@ -3010,37 +3048,49 @@ neuro service-account get [OPTIONS] SERVICE_ACCOUNT Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\--port-forward LOCAL\_PORT:REMOTE_RORT_|Forward port\(s) of a running job to local port\(s) \(use multiple times for forwarding several ports)| -### neuro service-account rm +## neuro cp -Remove service accounts SERVICE_ACCOUNT. +Copy files and directories.

Either SOURCES or DESTINATION should have storage:// scheme. If scheme is
omitted, file:// scheme is assumed.

Use /dev/stdin and /dev/stdout file names to copy a file from terminal and
print the content of file on the storage to console.

Any number of \--exclude and --include options can be passed. The filters that
appear later in the command take precedence over filters that appear earlier
in the command. If neither \--exclude nor --include options are specified the
default can be changed using the storage.cp-exclude configuration variable
documented in "neuro help user-config".
**Usage:** ```bash -neuro service-account rm [OPTIONS] SERVICE_ACCOUNTS... +neuro cp [OPTIONS] [SOURCES]... [DESTINATION] ``` -**Options:** +**Examples:** -Name | Description| -|----|------------| -|_--help_|Show this message and exit.| +```bash +# copy local files into remote storage root +neuro cp foo.txt bar/baz.dat storage: +neuro cp foo.txt bar/baz.dat -t storage: +# copy local directory `foo` into existing remote directory `bar` +neuro cp -r foo -t storage:bar +# copy the content of local directory `foo` into existing remote +# directory `bar` +neuro cp -r -T storage:foo storage:bar -## neuro help +# download remote file `foo.txt` into local file `/tmp/foo.txt` with +# explicit file:// scheme set +neuro cp storage:foo.txt file:///tmp/foo.txt +neuro cp -T storage:foo.txt file:///tmp/foo.txt +neuro cp storage:foo.txt file:///tmp +neuro cp storage:foo.txt -t file:///tmp -Get help on a command. +# download other user's remote file into the current directory +neuro cp storage://{username}/foo.txt . -**Usage:** +# download only files with extension `.out` into the current directory +neuro cp storage:results/*.out . -```bash -neuro help [OPTIONS] [COMMAND]... ``` **Options:** @@ -3048,34 +3098,39 @@ neuro help [OPTIONS] [COMMAND]... Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--continue_|Continue copying partially-copied files.| +|_\--exclude-from-files FILES_|A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp\-exclude-from-files configuration variable documented in "neuro help user-config"| +|_--exclude_|Exclude files and directories that match the specified pattern.| +|_--include_|Don't exclude files and directories that match the specified pattern.| +|_\--glob / --no-glob_|Expand glob patterns in SOURCES with explicit scheme. \[default: glob]| +|_\-T, --no-target-directory_|Treat DESTINATION as a normal file.| +|_\-p, --progress / -P, --no-progress_|Show progress, on by default in TTY mode, off otherwise.| +|_\-r, --recursive_|Recursive copy, off by default| +|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY.| +|_\-u, --update_|Copy only when the SOURCE file is newer than the destination file or when the destination file is missing.| -## neuro run +## neuro exec -Run a job

IMAGE docker image name to run in a job.

CMD list will be passed as arguments to the executed job's image.
+Execute command in a running job.
**Usage:** ```bash -neuro run [OPTIONS] IMAGE [-- CMD...] +neuro exec [OPTIONS] JOB -- CMD... ``` **Examples:** ```bash -# Starts a container pytorch:latest on a machine with smaller GPU resources -# (see exact values in `neuro config show`) and with two volumes mounted: -# storage:/ --> /var/storage/home (in read-write mode), -# storage:/neuromation/public --> /var/storage/neuromation (in read-only mode). -neuro run --preset=gpu-small --volume=storage::/var/storage/home:rw \ ---volume=storage:/neuromation/public:/var/storage/home:ro pytorch:latest +# Provides a shell to the container: +neuro exec my-job -- /bin/bash -# Starts a container using the custom image my-ubuntu:latest stored in neuro -# registry, run /script.sh and pass arg1 and arg2 as its arguments: -neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 arg2 +# Executes a single command in the container and returns the control: +neuro exec --no-tty my-job -- ls -l ``` @@ -3084,57 +3139,19 @@ neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 ar Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--browse_|Open a job's URL in a web browser| -|_--cluster CLUSTER_|Run job in a specified cluster| -|_\-d, --description DESC_|Optional job description in free format| -|_--detach_|Don't attach to job logs and don't wait for exit code| -|_--entrypoint TEXT_|Executable entrypoint in the container \(note that it overwrites `ENTRYPOINT` and `CMD` instructions of the docker image)| -|_\-e, --env VAR=VAL_|Set environment variable in container. Use multiple options to define more than one variable. See `neuro help secrets` for information about passing secrets as environment variables.| -|_\--env-file PATH_|File with environment variables to pass| -|_\-x, --extshm / -X, --no-extshm_|Request extended '/dev/shm' space \[default: x]| -|_--http PORT_|Enable HTTP port forwarding to container \[default: 80]| -|_\--http-auth / --no-http-auth_|Enable HTTP authentication for forwarded HTTP port \[default: True]| -|_\--life-span TIMEDELTA_|Optional job run-time limit in the format '1d2h3m4s' \(some parts may be missing). Set '0' to disable. Default value '1d' can be changed in the user config.| -|_\-n, --name NAME_|Optional job name| -|_--org ORG_|Run job in a specified org| -|_\--pass-config / --no-pass-config_|Upload neuro config to the job \[default: no\-pass-config]| -|_\--port-forward LOCAL\_PORT:REMOTE_RORT_|Forward port\(s) of a running job to local port\(s) \(use multiple times for forwarding several ports)| -|_\-s, --preset PRESET_|Predefined resource configuration \(to see available values, run `neuro config show`)| -|_--privileged_|Run job in privileged mode, if it is supported by cluster. \[default: False]| -|_\--restart \[never | on-failure | always]_|Restart policy to apply when a job exits \[default: never]| -|_\--schedule-timeout TIMEDELTA_|Optional job schedule timeout in the format '3m4s' \(some parts may be missing).| -|_--share USER_|Share job write permissions to user or role.| -|_--tag TAG_|Optional job tag, multiple values allowed| |_\-t, --tty / -T, --no-tty_|Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script.| -|_\-v, --volume MOUNT_|Mounts directory from vault into container. Use multiple options to mount more than one volume. See `neuro help secrets` for information about passing secrets as mounted files.| -|_\--wait-for-seat / --no-wait-for-seat_|Wait for total running jobs quota \[default: no\-wait-for-seat]| -|_\--wait-start / --no-wait-start_|Wait for a job start or failure \[default: wait-start]| -|_\-w, --workdir TEXT_|Working directory inside the container| -## neuro ps +## neuro help -List all jobs.
+Get help on a command. **Usage:** ```bash -neuro ps [OPTIONS] -``` - -**Examples:** - -```bash - -neuro ps -a -neuro ps -a --owner=user-1 --owner=user-2 -neuro ps --name my-experiments-v1 -s failed -s succeeded -neuro ps --description=my favourite job -neuro ps -s failed -s succeeded -q -neuro ps -t tag1 -t tag2 - +neuro help [OPTIONS] [COMMAND]... ``` **Options:** @@ -3142,32 +3159,18 @@ neuro ps -t tag1 -t tag2 Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-a, --all_|Show all jobs regardless the status.| -|_--cluster CLUSTER_|Show jobs on a specified cluster \(the current cluster by default).| -|_\-d, --description DESCRIPTION_|Filter out jobs by description \(exact match).| -|_--distinct_|Show only first job if names are same.| -|_--format COLUMNS_|Output table format, see "neuro help ps\-format" for more info about the format specification. The default can be changed using the job.ps-format configuration variable documented in "neuro help user-config"| -|_\--full-uri_|Output full image URI.| -|_\-n, --name NAME_|Filter out jobs by name.| -|_\-o, --owner TEXT_|Filter out jobs by owner \(multiple option). Supports `ME` option to filter by the current user.| -|_\--recent-first / --recent-last_|Show newer jobs first or last| -|_--since DATE\_OR_TIMEDELTA_|Show jobs created after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| -|_\-s, --status \[pending | suspended | running | succeeded | failed | cancelled]_|Filter out jobs by status \(multiple option).| -|_\-t, --tag TAG_|Filter out jobs by tag \(multiple option)| -|_--until DATE\_OR_TIMEDELTA_|Show jobs created before a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| -|_\-w, --wide_|Do not cut long lines for terminal width.| -## neuro status +## neuro images -Display status of a job. +List images. **Usage:** ```bash -neuro status [OPTIONS] JOB +neuro images [OPTIONS] ``` **Options:** @@ -3175,31 +3178,23 @@ neuro status [OPTIONS] JOB Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--full-uri_|Output full URI.| +|_--cluster CLUSTER_|Show images on a specified cluster \(the current cluster by default).| +|_-l_|List in long format.| +|_\--full-uri_|Output full image URI.| +|_\-n, --name PATTERN_|Filter out images by name regex.| +|_\-o, --owner TEXT_|Filter out images by owner \(multiple option). Supports `ME` option to filter by the current user.| -## neuro exec +## neuro kill -Execute command in a running job.
+Kill job\(s). **Usage:** ```bash -neuro exec [OPTIONS] JOB -- CMD... -``` - -**Examples:** - -```bash - -# Provides a shell to the container: -neuro exec my-job -- /bin/bash - -# Executes a single command in the container and returns the control: -neuro exec --no-tty my-job -- ls -l - +neuro kill [OPTIONS] JOBS... ``` **Options:** @@ -3207,38 +3202,18 @@ neuro exec --no-tty my-job -- ls -l Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-t, --tty / -T, --no-tty_|Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script.| -## neuro port-forward +## neuro login -Forward port\(s) of a job.

Forwards port\(s) of a running job to local port\(s).
+Log into Neuro Platform.

URL is a platform entrypoint URL. **Usage:** ```bash -neuro port-forward [OPTIONS] JOB LOCAL_PORT:REMOTE_RORT... -``` - -**Examples:** - -```bash - -# Forward local port 2080 to port 80 of job's container. -# You can use http://localhost:2080 in browser to access job's served http -neuro job port-forward my-fastai-job 2080:80 - -# Forward local port 2222 to job's port 22 -# Then copy all data from container's folder '/data' to current folder -# (please run second command in other terminal) -neuro job port-forward my-job-with-ssh-server 2222:22 -rsync -avxzhe ssh -p 2222 root@localhost:/data . - -# Forward few ports at once -neuro job port-forward my-job 2080:80 2222:22 2000:100 - +neuro login [OPTIONS] [URL] ``` **Options:** @@ -3250,14 +3225,14 @@ Name | Description| -## neuro attach +## neuro logout -Attach terminal to a job

Attach local standard input, output, and error streams to a running job. +Log out. **Usage:** ```bash -neuro attach [OPTIONS] JOB +neuro logout [OPTIONS] ``` **Options:** @@ -3265,7 +3240,6 @@ neuro attach [OPTIONS] JOB Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--port-forward LOCAL\_PORT:REMOTE_RORT_|Forward port\(s) of a running job to local port\(s) \(use multiple times for forwarding several ports)| @@ -3291,14 +3265,14 @@ Name | Description| -## neuro kill +## neuro ls -Kill job\(s). +List directory contents.

By default PATH is equal user's home dir \(storage:) **Usage:** ```bash -neuro kill [OPTIONS] JOBS... +neuro ls [OPTIONS] [PATHS]... ``` **Options:** @@ -3306,30 +3280,23 @@ neuro kill [OPTIONS] JOBS... Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\-d, --directory_|list directories themselves, not their contents.| +|_-l_|use a long listing format.| +|_\-h, --human-readable_|with -l print human readable sizes \(e.g., 2K, 540M).| +|_\-a, --all_|do not ignore entries starting with .| +|_--sort \[name | size | time]_|sort by given field, default is name.| -## neuro top +## neuro mkdir -Display GPU/CPU/Memory usage.
+Make directories. **Usage:** ```bash -neuro top [OPTIONS] [JOBS]... -``` - -**Examples:** - -```bash - -neuro top -neuro top job-1 job-2 -neuro top --owner=user-1 --owner=user-2 -neuro top --name my-experiments-v1 -neuro top -t tag1 -t tag2 - +neuro mkdir [OPTIONS] PATHS... ``` **Options:** @@ -3337,38 +3304,42 @@ neuro top -t tag1 -t tag2 Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Show jobs on a specified cluster \(the current cluster by default).| -|_\-d, --description DESCRIPTION_|Filter out jobs by description \(exact match).| -|_--format COLUMNS_|Output table format, see "neuro help top\-format" for more info about the format specification. The default can be changed using the job.top-format configuration variable documented in "neuro help user-config"| -|_\--full-uri_|Output full image URI.| -|_\-n, --name NAME_|Filter out jobs by name.| -|_\-o, --owner TEXT_|Filter out jobs by owner \(multiple option). Supports `ME` option to filter by the current user. Specify `ALL` to show jobs of all users.| -|_--since DATE\_OR_TIMEDELTA_|Show jobs created after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| -|_--sort COLUMNS_|Sort rows by specified column. Add "-" prefix to revert the sorting order. Multiple columns can be specified \(comma separated). \[default: cpu]| -|_\-t, --tag TAG_|Filter out jobs by tag \(multiple option)| -|_--timeout FLOAT_|Maximum allowed time for executing the command, 0 for no timeout \[default: 0]| -|_--until DATE\_OR_TIMEDELTA_|Show jobs created before a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| +|_\-p, --parents_|No error if existing, make parent directories as needed| -## neuro save +## neuro mv -Save job's state to an image.
+Move or rename files and directories.

SOURCE must contain path to the file or directory existing on the storage, and
DESTINATION must contain the full path to the target file or directory.
**Usage:** ```bash -neuro save [OPTIONS] JOB IMAGE +neuro mv [OPTIONS] [SOURCES]... [DESTINATION] ``` **Examples:** ```bash -neuro job save job-id image:ubuntu-patched -neuro job save my-favourite-job image:ubuntu-patched:v1 -neuro job save my-favourite-job image://bob/ubuntu-patched +# move and rename remote file +neuro mv storage:foo.txt storage:bar/baz.dat +neuro mv -T storage:foo.txt storage:bar/baz.dat + +# move remote files into existing remote directory +neuro mv storage:foo.txt storage:bar/baz.dat storage:dst +neuro mv storage:foo.txt storage:bar/baz.dat -t storage:dst + +# move the content of remote directory into other existing +# remote directory +neuro mv -T storage:foo storage:bar + +# move remote file into other user's directory +neuro mv storage:foo.txt storage://{username}/bar.dat + +# move remote file from other user's directory +neuro mv storage://{username}/foo.txt storage:bar.dat ``` @@ -3377,18 +3348,40 @@ neuro job save my-favourite-job image://bob/ubuntu-patched Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\--glob / --no-glob_|Expand glob patterns in SOURCES \[default: glob]| +|_\-T, --no-target-directory_|Treat DESTINATION as a normal file| +|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY| -## neuro login +## neuro port-forward -Log into Neuro Platform.

URL is a platform entrypoint URL. +Forward port\(s) of a job.

Forwards port\(s) of a running job to local port\(s).
+ +**Usage:** + +```bash +neuro port-forward [OPTIONS] JOB LOCAL_PORT:REMOTE_RORT... +``` + +**Examples:** + +```bash + +# Forward local port 2080 to port 80 of job's container. +# You can use http://localhost:2080 in browser to access job's served http +neuro job port-forward my-fastai-job 2080:80 + +# Forward local port 2222 to job's port 22 +# Then copy all data from container's folder '/data' to current folder +# (please run second command in other terminal) +neuro job port-forward my-job-with-ssh-server 2222:22 +rsync -avxzhe ssh -p 2222 root@localhost:/data . -**Usage:** +# Forward few ports at once +neuro job port-forward my-job 2080:80 2222:22 2000:100 -```bash -neuro login [OPTIONS] [URL] ``` **Options:** @@ -3400,14 +3393,27 @@ Name | Description| -## neuro logout +## neuro ps -Log out. +List all jobs.
**Usage:** ```bash -neuro logout [OPTIONS] +neuro ps [OPTIONS] +``` + +**Examples:** + +```bash + +neuro ps -a +neuro ps -a --owner=user-1 --owner=user-2 +neuro ps --name my-experiments-v1 -s failed -s succeeded +neuro ps --description=my favourite job +neuro ps -s failed -s succeeded -q +neuro ps -t tag1 -t tag2 + ``` **Options:** @@ -3415,47 +3421,41 @@ neuro logout [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\-a, --all_|Show all jobs regardless the status.| +|_--cluster CLUSTER_|Show jobs on a specified cluster \(the current cluster by default).| +|_\-d, --description DESCRIPTION_|Filter out jobs by description \(exact match).| +|_--distinct_|Show only first job if names are same.| +|_--format COLUMNS_|Output table format, see "neuro help ps\-format" for more info about the format specification. The default can be changed using the job.ps-format configuration variable documented in "neuro help user-config"| +|_\--full-uri_|Output full image URI.| +|_\-n, --name NAME_|Filter out jobs by name.| +|_\-o, --owner TEXT_|Filter out jobs by owner \(multiple option). Supports `ME` option to filter by the current user.| +|_\--recent-first / --recent-last_|Show newer jobs first or last| +|_--since DATE\_OR_TIMEDELTA_|Show jobs created after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| +|_\-s, --status \[pending | suspended | running | succeeded | failed | cancelled]_|Filter out jobs by status \(multiple option).| +|_\-t, --tag TAG_|Filter out jobs by tag \(multiple option)| +|_--until DATE\_OR_TIMEDELTA_|Show jobs created before a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| +|_\-w, --wide_|Do not cut long lines for terminal width.| -## neuro cp +## neuro pull -Copy files and directories.

Either SOURCES or DESTINATION should have storage:// scheme. If scheme is
omitted, file:// scheme is assumed.

Use /dev/stdin and /dev/stdout file names to copy a file from terminal and
print the content of file on the storage to console.

Any number of \--exclude and --include options can be passed. The filters that
appear later in the command take precedence over filters that appear earlier
in the command. If neither \--exclude nor --include options are specified the
default can be changed using the storage.cp-exclude configuration variable
documented in "neuro help user-config".
+Pull an image from platform registry.

Remote image name must be URL with image:// scheme. Image names can contain
tag.
**Usage:** ```bash -neuro cp [OPTIONS] [SOURCES]... [DESTINATION] +neuro pull [OPTIONS] REMOTE_IMAGE [LOCAL_IMAGE] ``` **Examples:** ```bash -# copy local files into remote storage root -neuro cp foo.txt bar/baz.dat storage: -neuro cp foo.txt bar/baz.dat -t storage: - -# copy local directory `foo` into existing remote directory `bar` -neuro cp -r foo -t storage:bar - -# copy the content of local directory `foo` into existing remote -# directory `bar` -neuro cp -r -T storage:foo storage:bar - -# download remote file `foo.txt` into local file `/tmp/foo.txt` with -# explicit file:// scheme set -neuro cp storage:foo.txt file:///tmp/foo.txt -neuro cp -T storage:foo.txt file:///tmp/foo.txt -neuro cp storage:foo.txt file:///tmp -neuro cp storage:foo.txt -t file:///tmp - -# download other user's remote file into the current directory -neuro cp storage://{username}/foo.txt . - -# download only files with extension `.out` into the current directory -neuro cp storage:results/*.out . +neuro pull image:myimage +neuro pull image://myfriend/alpine:shared +neuro pull image://username/my-alpine:production alpine:from-registry ``` @@ -3464,28 +3464,28 @@ neuro cp storage:results/*.out . Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--continue_|Continue copying partially-copied files.| -|_\--exclude-from-files FILES_|A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp\-exclude-from-files configuration variable documented in "neuro help user-config"| -|_--exclude_|Exclude files and directories that match the specified pattern.| -|_--include_|Don't exclude files and directories that match the specified pattern.| -|_\--glob / --no-glob_|Expand glob patterns in SOURCES with explicit scheme. \[default: glob]| -|_\-T, --no-target-directory_|Treat DESTINATION as a normal file.| -|_\-p, --progress / -P, --no-progress_|Show progress, on by default in TTY mode, off otherwise.| -|_\-r, --recursive_|Recursive copy, off by default| -|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY.| -|_\-u, --update_|Copy only when the SOURCE file is newer than the destination file or when the destination file is missing.| -## neuro ls +## neuro push -List directory contents.

By default PATH is equal user's home dir \(storage:) +Push an image to platform registry.

Remote image must be URL with image:// scheme. Image names can contain tag. If
tags not specified 'latest' will be used as value.
**Usage:** ```bash -neuro ls [OPTIONS] [PATHS]... +neuro push [OPTIONS] LOCAL_IMAGE [REMOTE_IMAGE] +``` + +**Examples:** + +```bash + +neuro push myimage +neuro push alpine:latest image:my-alpine:production +neuro push alpine image://myfriend/alpine:shared + ``` **Options:** @@ -3493,11 +3493,6 @@ neuro ls [OPTIONS] [PATHS]... Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\-d, --directory_|list directories themselves, not their contents.| -|_-l_|use a long listing format.| -|_\-h, --human-readable_|with -l print human readable sizes \(e.g., 2K, 540M).| -|_\-a, --all_|do not ignore entries starting with .| -|_--sort \[name | size | time]_|sort by given field, default is name.| @@ -3535,57 +3530,30 @@ Name | Description| -## neuro mkdir - -Make directories. - -**Usage:** - -```bash -neuro mkdir [OPTIONS] PATHS... -``` - -**Options:** - -Name | Description| -|----|------------| -|_--help_|Show this message and exit.| -|_\-p, --parents_|No error if existing, make parent directories as needed| - - - - -## neuro mv +## neuro run -Move or rename files and directories.

SOURCE must contain path to the file or directory existing on the storage, and
DESTINATION must contain the full path to the target file or directory.
+Run a job

IMAGE docker image name to run in a job.

CMD list will be passed as arguments to the executed job's image.
**Usage:** ```bash -neuro mv [OPTIONS] [SOURCES]... [DESTINATION] +neuro run [OPTIONS] IMAGE [-- CMD...] ``` **Examples:** ```bash -# move and rename remote file -neuro mv storage:foo.txt storage:bar/baz.dat -neuro mv -T storage:foo.txt storage:bar/baz.dat - -# move remote files into existing remote directory -neuro mv storage:foo.txt storage:bar/baz.dat storage:dst -neuro mv storage:foo.txt storage:bar/baz.dat -t storage:dst - -# move the content of remote directory into other existing -# remote directory -neuro mv -T storage:foo storage:bar - -# move remote file into other user's directory -neuro mv storage:foo.txt storage://{username}/bar.dat +# Starts a container pytorch:latest on a machine with smaller GPU resources +# (see exact values in `neuro config show`) and with two volumes mounted: +# storage:/ --> /var/storage/home (in read-write mode), +# storage:/neuromation/public --> /var/storage/neuromation (in read-only mode). +neuro run --preset=gpu-small --volume=storage::/var/storage/home:rw \ +--volume=storage:/neuromation/public:/var/storage/home:ro pytorch:latest -# move remote file from other user's directory -neuro mv storage://{username}/foo.txt storage:bar.dat +# Starts a container using the custom image my-ubuntu:latest stored in neuro +# registry, run /script.sh and pass arg1 and arg2 as its arguments: +neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 arg2 ``` @@ -3594,21 +3562,54 @@ neuro mv storage://{username}/foo.txt storage:bar.dat Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_\--glob / --no-glob_|Expand glob patterns in SOURCES \[default: glob]| -|_\-T, --no-target-directory_|Treat DESTINATION as a normal file| -|_\-t, --target-directory DIRECTORY_|Copy all SOURCES into DIRECTORY| +|_--browse_|Open a job's URL in a web browser| +|_--cluster CLUSTER_|Run job in a specified cluster| +|_\-d, --description DESC_|Optional job description in free format| +|_--detach_|Don't attach to job logs and don't wait for exit code| +|_--entrypoint TEXT_|Executable entrypoint in the container \(note that it overwrites `ENTRYPOINT` and `CMD` instructions of the docker image)| +|_\-e, --env VAR=VAL_|Set environment variable in container. Use multiple options to define more than one variable. See `neuro help secrets` for information about passing secrets as environment variables.| +|_\--env-file PATH_|File with environment variables to pass| +|_\-x, --extshm / -X, --no-extshm_|Request extended '/dev/shm' space \[default: x]| +|_--http PORT_|Enable HTTP port forwarding to container \[default: 80]| +|_\--http-auth / --no-http-auth_|Enable HTTP authentication for forwarded HTTP port \[default: True]| +|_\--life-span TIMEDELTA_|Optional job run-time limit in the format '1d2h3m4s' \(some parts may be missing). Set '0' to disable. Default value '1d' can be changed in the user config.| +|_\-n, --name NAME_|Optional job name| +|_--org ORG_|Run job in a specified org| +|_\--pass-config / --no-pass-config_|Upload neuro config to the job \[default: no\-pass-config]| +|_\--port-forward LOCAL\_PORT:REMOTE_RORT_|Forward port\(s) of a running job to local port\(s) \(use multiple times for forwarding several ports)| +|_\-s, --preset PRESET_|Predefined resource configuration \(to see available values, run `neuro config show`)| +|_--privileged_|Run job in privileged mode, if it is supported by cluster. \[default: False]| +|_\--restart \[never | on-failure | always]_|Restart policy to apply when a job exits \[default: never]| +|_\--schedule-timeout TIMEDELTA_|Optional job schedule timeout in the format '3m4s' \(some parts may be missing).| +|_--share USER_|Share job write permissions to user or role.| +|_--tag TAG_|Optional job tag, multiple values allowed| +|_\-t, --tty / -T, --no-tty_|Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script.| +|_\-v, --volume MOUNT_|Mounts directory from vault into container. Use multiple options to mount more than one volume. See `neuro help secrets` for information about passing secrets as mounted files.| +|_\--wait-for-seat / --no-wait-for-seat_|Wait for total running jobs quota \[default: no\-wait-for-seat]| +|_\--wait-start / --no-wait-start_|Wait for a job start or failure \[default: wait-start]| +|_\-w, --workdir TEXT_|Working directory inside the container| -## neuro images +## neuro save -List images. +Save job's state to an image.
**Usage:** ```bash -neuro images [OPTIONS] +neuro save [OPTIONS] JOB IMAGE +``` + +**Examples:** + +```bash + +neuro job save job-id image:ubuntu-patched +neuro job save my-favourite-job image:ubuntu-patched:v1 +neuro job save my-favourite-job image://bob/ubuntu-patched + ``` **Options:** @@ -3616,32 +3617,27 @@ neuro images [OPTIONS] Name | Description| |----|------------| |_--help_|Show this message and exit.| -|_--cluster CLUSTER_|Show images on a specified cluster \(the current cluster by default).| -|_-l_|List in long format.| -|_\--full-uri_|Output full image URI.| -|_\-n, --name PATTERN_|Filter out images by name regex.| -|_\-o, --owner TEXT_|Filter out images by owner \(multiple option). Supports `ME` option to filter by the current user.| -## neuro push +## neuro share -Push an image to platform registry.

Remote image must be URL with image:// scheme. Image names can contain tag. If
tags not specified 'latest' will be used as value.
+Shares resource with another user.

URI shared resource.

USER username to share resource with.

PERMISSION sharing access right: read, write, or manage.
**Usage:** ```bash -neuro push [OPTIONS] LOCAL_IMAGE [REMOTE_IMAGE] +neuro share [OPTIONS] URI USER {read|write|manage} ``` **Examples:** ```bash -neuro push myimage -neuro push alpine:latest image:my-alpine:production -neuro push alpine image://myfriend/alpine:shared +neuro acl grant storage:///sample_data/ alice manage +neuro acl grant image:resnet50 bob read +neuro acl grant job:///my_job_id alice write ``` @@ -3654,24 +3650,14 @@ Name | Description| -## neuro pull +## neuro status -Pull an image from platform registry.

Remote image name must be URL with image:// scheme. Image names can contain
tag.
+Display status of a job. **Usage:** ```bash -neuro pull [OPTIONS] REMOTE_IMAGE [LOCAL_IMAGE] -``` - -**Examples:** - -```bash - -neuro pull image:myimage -neuro pull image://myfriend/alpine:shared -neuro pull image://username/my-alpine:production alpine:from-registry - +neuro status [OPTIONS] JOB ``` **Options:** @@ -3679,27 +3665,30 @@ neuro pull image://username/my-alpine:production alpine:from-registry Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_\--full-uri_|Output full URI.| -## neuro share +## neuro top -Shares resource with another user.

URI shared resource.

USER username to share resource with.

PERMISSION sharing access right: read, write, or manage.
+Display GPU/CPU/Memory usage.
**Usage:** ```bash -neuro share [OPTIONS] URI USER {read|write|manage} +neuro top [OPTIONS] [JOBS]... ``` **Examples:** ```bash -neuro acl grant storage:///sample_data/ alice manage -neuro acl grant image:resnet50 bob read -neuro acl grant job:///my_job_id alice write +neuro top +neuro top job-1 job-2 +neuro top --owner=user-1 --owner=user-2 +neuro top --name my-experiments-v1 +neuro top -t tag1 -t tag2 ``` @@ -3708,5 +3697,16 @@ neuro acl grant job:///my_job_id alice write Name | Description| |----|------------| |_--help_|Show this message and exit.| +|_--cluster CLUSTER_|Show jobs on a specified cluster \(the current cluster by default).| +|_\-d, --description DESCRIPTION_|Filter out jobs by description \(exact match).| +|_--format COLUMNS_|Output table format, see "neuro help top\-format" for more info about the format specification. The default can be changed using the job.top-format configuration variable documented in "neuro help user-config"| +|_\--full-uri_|Output full image URI.| +|_\-n, --name NAME_|Filter out jobs by name.| +|_\-o, --owner TEXT_|Filter out jobs by owner \(multiple option). Supports `ME` option to filter by the current user. Specify `ALL` to show jobs of all users.| +|_--since DATE\_OR_TIMEDELTA_|Show jobs created after a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| +|_--sort COLUMNS_|Sort rows by specified column. Add "-" prefix to revert the sorting order. Multiple columns can be specified \(comma separated). \[default: cpu]| +|_\-t, --tag TAG_|Filter out jobs by tag \(multiple option)| +|_--timeout FLOAT_|Maximum allowed time for executing the command, 0 for no timeout \[default: 0]| +|_--until DATE\_OR_TIMEDELTA_|Show jobs created before a specific date \(including). Use value of format '1d2h3m4s' to specify moment in past relatively to current time.| diff --git a/neuro-cli/docs/acl.md b/neuro-cli/docs/acl.md index dcb235a70..d40689652 100644 --- a/neuro-cli/docs/acl.md +++ b/neuro-cli/docs/acl.md @@ -13,40 +13,30 @@ Access Control List management. **Commands:** | Usage | Description | | :--- | :--- | +| [_add-role_](acl.md#add-role) | Add new role | | [_grant_](acl.md#grant) | Shares resource with another user | -| [_revoke_](acl.md#revoke) | Revoke user access from another user | | [_ls_](acl.md#ls) | List shared resources | -| [_add-role_](acl.md#add-role) | Add new role | | [_remove-role_](acl.md#remove-role) | Remove existing role | +| [_revoke_](acl.md#revoke) | Revoke user access from another user | -### grant +### add-role -Shares resource with another user +Add new role #### Usage ```bash -neuro acl grant [OPTIONS] URI USER {read|write|manage} +neuro acl add-role [OPTIONS] ROLE_NAME ``` -Shares resource with another user. - -`URI` shared resource. - -`USER` username to -share resource with. - -`PERMISSION` sharing access right: read, write, or -manage. +Add new role. #### Examples ```bash -$ neuro acl grant storage:///sample_data/ alice manage -$ neuro acl grant image:resnet50 bob read -$ neuro acl grant job:///my_job_id alice write +$ neuro acl add-role mycompany/subdivision ``` #### Options @@ -57,30 +47,33 @@ $ neuro acl grant job:///my_job_id alice write -### revoke +### grant -Revoke user access from another user +Shares resource with another user #### Usage ```bash -neuro acl revoke [OPTIONS] URI USER +neuro acl grant [OPTIONS] URI USER {read|write|manage} ``` -Revoke user access from another user. +Shares resource with another user. -`URI` previously shared resource to -revoke. +`URI` shared resource. -`USER` to revoke `URI` resource from. +`USER` username to +share resource with. + +`PERMISSION` sharing access right: read, write, or +manage. #### Examples ```bash -$ neuro acl revoke storage:///sample_data/ alice -$ neuro acl revoke image:resnet50 bob -$ neuro acl revoke job:///my_job_id alice +$ neuro acl grant storage:///sample_data/ alice manage +$ neuro acl grant image:resnet50 bob read +$ neuro acl grant job:///my_job_id alice write ``` #### Options @@ -130,23 +123,23 @@ $ neuro acl list --shared image:// -### add-role +### remove-role -Add new role +Remove existing role #### Usage ```bash -neuro acl add-role [OPTIONS] ROLE_NAME +neuro acl remove-role [OPTIONS] ROLE_NAME ``` -Add new role. +Remove existing role. #### Examples ```bash -$ neuro acl add-role mycompany/subdivision +$ neuro acl remove-role mycompany/subdivision ``` #### Options @@ -157,23 +150,30 @@ $ neuro acl add-role mycompany/subdivision -### remove-role +### revoke -Remove existing role +Revoke user access from another user #### Usage ```bash -neuro acl remove-role [OPTIONS] ROLE_NAME +neuro acl revoke [OPTIONS] URI USER ``` -Remove existing role. +Revoke user access from another user. + +`URI` previously shared resource to +revoke. + +`USER` to revoke `URI` resource from. #### Examples ```bash -$ neuro acl remove-role mycompany/subdivision +$ neuro acl revoke storage:///sample_data/ alice +$ neuro acl revoke image:resnet50 bob +$ neuro acl revoke job:///my_job_id alice ``` #### Options diff --git a/neuro-cli/docs/admin.md b/neuro-cli/docs/admin.md index ff9d597be..0cc699a12 100644 --- a/neuro-cli/docs/admin.md +++ b/neuro-cli/docs/admin.md @@ -13,47 +13,51 @@ Cluster administration commands. **Commands:** | Usage | Description | | :--- | :--- | -| [_get-clusters_](admin.md#get-clusters) | Print the list of available clusters | -| [_generate-cluster-config_](admin.md#generate-cluster-config) | Create a cluster configuration file | | [_add-cluster_](admin.md#add-cluster) | Create a new cluster | -| [_remove-cluster_](admin.md#remove-cluster) | Drop a cluster | -| [_show-cluster-options_](admin.md#show-cluster-options) | Show available cluster options | -| [_get-cluster-users_](admin.md#get-cluster-users) | List users in specified cluster | | [_add-cluster-user_](admin.md#add-cluster-user) | Add user access to specified cluster | -| [_remove-cluster-user_](admin.md#remove-cluster-user) | Remove user access from the cluster | -| [_get-user-quota_](admin.md#get-user-quota) | Get info about user quota in given cluster | -| [_set-user-quota_](admin.md#set-user-quota) | Set user quota to given values | -| [_set-user-credits_](admin.md#set-user-credits) | Set user credits to given value | -| [_add-user-credits_](admin.md#add-user-credits) | Add given values to user quota | +| [_add-org_](admin.md#add-org) | Create a new org | +| [_add-org-cluster_](admin.md#add-org-cluster) | Add org access to specified cluster | +| [_add-org-cluster-credits_](admin.md#add-org-cluster-credits) | Add given values to org cluster balance | +| [_add-org-user_](admin.md#add-org-user) | Add user access to specified org | | [_add-resource-preset_](admin.md#add-resource-preset) | Add new resource preset | -| [_update-resource-preset_](admin.md#update-resource-preset) | Update existing resource preset | -| [_remove-resource-preset_](admin.md#remove-resource-preset) | Remove resource preset | +| [_add-user-credits_](admin.md#add-user-credits) | Add given values to user quota | +| [_generate-cluster-config_](admin.md#generate-cluster-config) | Create a cluster configuration file | +| [_get-cluster-users_](admin.md#get-cluster-users) | List users in specified cluster | +| [_get-clusters_](admin.md#get-clusters) | Print the list of available clusters | +| [_get-org-cluster-quota_](admin.md#get-org-cluster-quota) | Get info about org quota in given cluster | +| [_get-org-clusters_](admin.md#get-org-clusters) | Print the list of all orgs in the cluster | +| [_get-org-users_](admin.md#get-org-users) | List users in specified org | | [_get-orgs_](admin.md#get-orgs) | Print the list of available orgs | -| [_add-org_](admin.md#add-org) | Create a new org | +| [_get-user-quota_](admin.md#get-user-quota) | Get info about user quota in given cluster | +| [_remove-cluster_](admin.md#remove-cluster) | Drop a cluster | +| [_remove-cluster-user_](admin.md#remove-cluster-user) | Remove user access from the cluster | | [_remove-org_](admin.md#remove-org) | Drop a org | -| [_get-org-users_](admin.md#get-org-users) | List users in specified org | -| [_add-org-user_](admin.md#add-org-user) | Add user access to specified org | | [_remove-org-user_](admin.md#remove-org-user) | Remove user access from the org | -| [_get-org-clusters_](admin.md#get-org-clusters) | Print the list of all orgs in the cluster | -| [_add-org-cluster_](admin.md#add-org-cluster) | Add org access to specified cluster | -| [_get-org-cluster-quota_](admin.md#get-org-cluster-quota) | Get info about org quota in given cluster | -| [_set-org-cluster-quota_](admin.md#set-org-cluster-quota) | Set org cluster quota to given values | +| [_remove-resource-preset_](admin.md#remove-resource-preset) | Remove resource preset | | [_set-org-cluster-credits_](admin.md#set-org-cluster-credits) | Set org cluster credits to given value | -| [_add-org-cluster-credits_](admin.md#add-org-cluster-credits) | Add given values to org cluster balance | +| [_set-org-cluster-quota_](admin.md#set-org-cluster-quota) | Set org cluster quota to given values | +| [_set-user-credits_](admin.md#set-user-credits) | Set user credits to given value | +| [_set-user-quota_](admin.md#set-user-quota) | Set user quota to given values | +| [_show-cluster-options_](admin.md#show-cluster-options) | Show available cluster options | +| [_update-resource-preset_](admin.md#update-resource-preset) | Update existing resource preset | -### get-clusters +### add-cluster -Print the list of available clusters +Create a new cluster #### Usage ```bash -neuro admin get-clusters [OPTIONS] +neuro admin add-cluster [OPTIONS] CLUSTER_NAME CONFIG ``` -Print the list of available clusters. +Create a new cluster. + +Creates cluster entry on admin side and then start its +provisioning using +provided config. #### Options @@ -63,44 +67,45 @@ Print the list of available clusters. -### generate-cluster-config +### add-cluster-user -Create a cluster configuration file +Add user access to specified cluster #### Usage ```bash -neuro admin generate-cluster-config [OPTIONS] [CONFIG] +neuro admin add-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME [ROLE] ``` -Create a cluster configuration file. +Add user access to specified cluster. + +The command supports one of 3 user +roles: admin, manager or user. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--type \[aws | gcp | azure | vcd\]_ | | +| _-c, --credits AMOUNT_ | Credits amount to set \(`unlimited' stands for no limit\) _\[default: unlimited\]_ | +| _-j, --jobs AMOUNT_ | Maximum running jobs quota \(`unlimited' stands for no limit\) _\[default: unlimited\]_ | +| _--org ORG_ | org name for org-cluster users | -### add-cluster +### add-org -Create a new cluster +Create a new org #### Usage ```bash -neuro admin add-cluster [OPTIONS] CLUSTER_NAME CONFIG +neuro admin add-org [OPTIONS] ORG_NAME ``` -Create a new cluster. - -Creates cluster entry on admin side and then start its -provisioning using -provided config. +Create a new org. #### Options @@ -110,286 +115,268 @@ provided config. -### remove-cluster +### add-org-cluster -Drop a cluster +Add org access to specified cluster #### Usage ```bash -neuro admin remove-cluster [OPTIONS] CLUSTER_NAME +neuro admin add-org-cluster [OPTIONS] CLUSTER_NAME ORG_NAME ``` -Drop a cluster - -Completely removes cluster from the system. +Add org access to specified cluster. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--force_ | Skip prompt | +| _-c, --credits AMOUNT_ | Credits amount to set \(`unlimited' stands for no limit\) _\[default: unlimited\]_ | +| _-j, --jobs AMOUNT_ | Maximum running jobs quota \(`unlimited' stands for no limit\) _\[default: unlimited\]_ | -### show-cluster-options +### add-org-cluster-credits -Show available cluster options +Add given values to org cluster balance #### Usage ```bash -neuro admin show-cluster-options [OPTIONS] +neuro admin add-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME ``` -Show available cluster options. +Add given values to org cluster balance #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--type \[aws | gcp | azure\]_ | | +| _-c, --credits AMOUNT_ | Credits amount to add | -### get-cluster-users +### add-org-user -List users in specified cluster +Add user access to specified org #### Usage ```bash -neuro admin get-cluster-users [OPTIONS] [CLUSTER_NAME] +neuro admin add-org-user [OPTIONS] ORG_NAME USER_NAME [ROLE] ``` -List users in specified cluster +Add user access to specified org. + +The command supports one of 3 user roles: +admin, manager or user. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--org ORG_ | org name for org-cluster users | -### add-cluster-user +### add-resource-preset -Add user access to specified cluster +Add new resource preset #### Usage ```bash -neuro admin add-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME [ROLE] +neuro admin add-resource-preset [OPTIONS] PRESET_NAME ``` -Add user access to specified cluster. - -The command supports one of 3 user -roles: admin, manager or user. +Add new resource preset #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-c, --credits AMOUNT_ | Credits amount to set \(`unlimited' stands for no limit\) _\[default: unlimited\]_ | -| _-j, --jobs AMOUNT_ | Maximum running jobs quota \(`unlimited' stands for no limit\) _\[default: unlimited\]_ | -| _--org ORG_ | org name for org-cluster users | +| _-c, --cpu NUMBER_ | Number of CPUs _\[default: 0.1\]_ | +| _--credits-per-hour AMOUNT_ | Price of running job of this preset for an hour in credits _\[default: 0\]_ | +| _-g, --gpu NUMBER_ | Number of GPUs | +| _--gpu-model MODEL_ | GPU model | +| _-m, --memory AMOUNT_ | Memory amount _\[default: 1G\]_ | +| _--preemptible-node / --non-preemptible-node_ | Use a lower-cost preemptible instance _\[default: non-preemptible-node\]_ | +| _-p, --scheduler / -P, --no-scheduler_ | Use round robin scheduler for jobs _\[default: no-scheduler\]_ | +| _--tpu-sw-version VERSION_ | TPU software version | +| _--tpu-type TYPE_ | TPU type | -### remove-cluster-user +### add-user-credits -Remove user access from the cluster +Add given values to user quota #### Usage ```bash -neuro admin remove-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin add-user-credits [OPTIONS] CLUSTER_NAME USER_NAME ``` -Remove user access from the cluster. +Add given values to user quota #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _-c, --credits AMOUNT_ | Credits amount to add _\[required\]_ | | _--org ORG_ | org name for org-cluster users | -### get-user-quota +### generate-cluster-config -Get info about user quota in given cluster +Create a cluster configuration file #### Usage ```bash -neuro admin get-user-quota [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin generate-cluster-config [OPTIONS] [CONFIG] ``` -Get info about user quota in given cluster +Create a cluster configuration file. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--org ORG_ | org name for org-cluster users | +| _--type \[aws | gcp | azure | vcd\]_ | | -### set-user-quota +### get-cluster-users -Set user quota to given values +List users in specified cluster #### Usage ```bash -neuro admin set-user-quota [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin get-cluster-users [OPTIONS] [CLUSTER_NAME] ``` -Set user quota to given values +List users in specified cluster #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-j, --jobs AMOUNT_ | Maximum running jobs quota \(`unlimited' stands for no limit\) _\[required\]_ | | _--org ORG_ | org name for org-cluster users | -### set-user-credits +### get-clusters -Set user credits to given value +Print the list of available clusters #### Usage ```bash -neuro admin set-user-credits [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin get-clusters [OPTIONS] ``` -Set user credits to given value +Print the list of available clusters. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-c, --credits AMOUNT_ | Credits amount to set \(`unlimited' stands for no limit\) _\[required\]_ | -| _--org ORG_ | org name for org-cluster users | -### add-user-credits +### get-org-cluster-quota -Add given values to user quota +Get info about org quota in given cluster #### Usage ```bash -neuro admin add-user-credits [OPTIONS] CLUSTER_NAME USER_NAME +neuro admin get-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME ``` -Add given values to user quota +Get info about org quota in given cluster #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-c, --credits AMOUNT_ | Credits amount to add _\[required\]_ | -| _--org ORG_ | org name for org-cluster users | -### add-resource-preset +### get-org-clusters -Add new resource preset +Print the list of all orgs in the cluster #### Usage ```bash -neuro admin add-resource-preset [OPTIONS] PRESET_NAME +neuro admin get-org-clusters [OPTIONS] CLUSTER_NAME ``` -Add new resource preset +Print the list of all orgs in the cluster #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-c, --cpu NUMBER_ | Number of CPUs _\[default: 0.1\]_ | -| _--credits-per-hour AMOUNT_ | Price of running job of this preset for an hour in credits _\[default: 0\]_ | -| _-g, --gpu NUMBER_ | Number of GPUs | -| _--gpu-model MODEL_ | GPU model | -| _-m, --memory AMOUNT_ | Memory amount _\[default: 1G\]_ | -| _--preemptible-node / --non-preemptible-node_ | Use a lower-cost preemptible instance _\[default: non-preemptible-node\]_ | -| _-p, --scheduler / -P, --no-scheduler_ | Use round robin scheduler for jobs _\[default: no-scheduler\]_ | -| _--tpu-sw-version VERSION_ | TPU software version | -| _--tpu-type TYPE_ | TPU type | -### update-resource-preset +### get-org-users -Update existing resource preset +List users in specified org #### Usage ```bash -neuro admin update-resource-preset [OPTIONS] PRESET_NAME +neuro admin get-org-users [OPTIONS] ORG_NAME ``` -Update existing resource preset +List users in specified org #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-c, --cpu NUMBER_ | Number of CPUs | -| _--credits-per-hour AMOUNT_ | Price of running job of this preset for an hour in credits | -| _-g, --gpu NUMBER_ | Number of GPUs | -| _--gpu-model MODEL_ | GPU model | -| _-m, --memory AMOUNT_ | Memory amount | -| _--preemptible-node / --non-preemptible-node_ | Use a lower-cost preemptible instance | -| _-p, --scheduler / -P, --no-scheduler_ | Use round robin scheduler for jobs | -| _--tpu-sw-version VERSION_ | TPU software version | -| _--tpu-type TYPE_ | TPU type | -### remove-resource-preset +### get-orgs -Remove resource preset +Print the list of available orgs #### Usage ```bash -neuro admin remove-resource-preset [OPTIONS] PRESET_NAME +neuro admin get-orgs [OPTIONS] ``` -Remove resource preset +Print the list of available orgs. #### Options @@ -399,108 +386,110 @@ Remove resource preset -### get-orgs +### get-user-quota -Print the list of available orgs +Get info about user quota in given cluster #### Usage ```bash -neuro admin get-orgs [OPTIONS] +neuro admin get-user-quota [OPTIONS] CLUSTER_NAME USER_NAME ``` -Print the list of available orgs. +Get info about user quota in given cluster #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--org ORG_ | org name for org-cluster users | -### add-org +### remove-cluster -Create a new org +Drop a cluster #### Usage ```bash -neuro admin add-org [OPTIONS] ORG_NAME +neuro admin remove-cluster [OPTIONS] CLUSTER_NAME ``` -Create a new org. +Drop a cluster + +Completely removes cluster from the system. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--force_ | Skip prompt | -### remove-org +### remove-cluster-user -Drop a org +Remove user access from the cluster #### Usage ```bash -neuro admin remove-org [OPTIONS] ORG_NAME +neuro admin remove-cluster-user [OPTIONS] CLUSTER_NAME USER_NAME ``` -Drop a org - -Completely removes org from the system. +Remove user access from the cluster. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--force_ | Skip prompt | +| _--org ORG_ | org name for org-cluster users | -### get-org-users +### remove-org -List users in specified org +Drop a org #### Usage ```bash -neuro admin get-org-users [OPTIONS] ORG_NAME +neuro admin remove-org [OPTIONS] ORG_NAME ``` -List users in specified org +Drop a org + +Completely removes org from the system. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--force_ | Skip prompt | -### add-org-user +### remove-org-user -Add user access to specified org +Remove user access from the org #### Usage ```bash -neuro admin add-org-user [OPTIONS] ORG_NAME USER_NAME [ROLE] +neuro admin remove-org-user [OPTIONS] ORG_NAME USER_NAME ``` -Add user access to specified org. - -The command supports one of 3 user roles: -admin, manager or user. +Remove user access from the org. #### Options @@ -510,18 +499,18 @@ admin, manager or user. -### remove-org-user +### remove-resource-preset -Remove user access from the org +Remove resource preset #### Usage ```bash -neuro admin remove-org-user [OPTIONS] ORG_NAME USER_NAME +neuro admin remove-resource-preset [OPTIONS] PRESET_NAME ``` -Remove user access from the org. +Remove resource preset #### Options @@ -531,83 +520,85 @@ Remove user access from the org. -### get-org-clusters +### set-org-cluster-credits -Print the list of all orgs in the cluster +Set org cluster credits to given value #### Usage ```bash -neuro admin get-org-clusters [OPTIONS] CLUSTER_NAME +neuro admin set-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME ``` -Print the list of all orgs in the cluster +Set org cluster credits to given value #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _-c, --credits AMOUNT_ | Credits amount to set \(`unlimited' stands for no limit\) _\[required\]_ | -### add-org-cluster +### set-org-cluster-quota -Add org access to specified cluster +Set org cluster quota to given values #### Usage ```bash -neuro admin add-org-cluster [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin set-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME ``` -Add org access to specified cluster. +Set org cluster quota to given values #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-c, --credits AMOUNT_ | Credits amount to set \(`unlimited' stands for no limit\) _\[default: unlimited\]_ | -| _-j, --jobs AMOUNT_ | Maximum running jobs quota \(`unlimited' stands for no limit\) _\[default: unlimited\]_ | +| _-j, --jobs AMOUNT_ | Maximum running jobs quota \(`unlimited' stands for no limit\) _\[required\]_ | -### get-org-cluster-quota +### set-user-credits -Get info about org quota in given cluster +Set user credits to given value #### Usage ```bash -neuro admin get-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin set-user-credits [OPTIONS] CLUSTER_NAME USER_NAME ``` -Get info about org quota in given cluster +Set user credits to given value #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _-c, --credits AMOUNT_ | Credits amount to set \(`unlimited' stands for no limit\) _\[required\]_ | +| _--org ORG_ | org name for org-cluster users | -### set-org-cluster-quota +### set-user-quota -Set org cluster quota to given values +Set user quota to given values #### Usage ```bash -neuro admin set-org-cluster-quota [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin set-user-quota [OPTIONS] CLUSTER_NAME USER_NAME ``` -Set org cluster quota to given values +Set user quota to given values #### Options @@ -615,49 +606,58 @@ Set org cluster quota to given values | :--- | :--- | | _--help_ | Show this message and exit. | | _-j, --jobs AMOUNT_ | Maximum running jobs quota \(`unlimited' stands for no limit\) _\[required\]_ | +| _--org ORG_ | org name for org-cluster users | -### set-org-cluster-credits +### show-cluster-options -Set org cluster credits to given value +Show available cluster options #### Usage ```bash -neuro admin set-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin show-cluster-options [OPTIONS] ``` -Set org cluster credits to given value +Show available cluster options. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-c, --credits AMOUNT_ | Credits amount to set \(`unlimited' stands for no limit\) _\[required\]_ | +| _--type \[aws | gcp | azure\]_ | | -### add-org-cluster-credits +### update-resource-preset -Add given values to org cluster balance +Update existing resource preset #### Usage ```bash -neuro admin add-org-cluster-credits [OPTIONS] CLUSTER_NAME ORG_NAME +neuro admin update-resource-preset [OPTIONS] PRESET_NAME ``` -Add given values to org cluster balance +Update existing resource preset #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-c, --credits AMOUNT_ | Credits amount to add | +| _-c, --cpu NUMBER_ | Number of CPUs | +| _--credits-per-hour AMOUNT_ | Price of running job of this preset for an hour in credits | +| _-g, --gpu NUMBER_ | Number of GPUs | +| _--gpu-model MODEL_ | GPU model | +| _-m, --memory AMOUNT_ | Memory amount | +| _--preemptible-node / --non-preemptible-node_ | Use a lower-cost preemptible instance | +| _-p, --scheduler / -P, --no-scheduler_ | Use round robin scheduler for jobs | +| _--tpu-sw-version VERSION_ | TPU software version | +| _--tpu-type TYPE_ | TPU type | diff --git a/neuro-cli/docs/blob.md b/neuro-cli/docs/blob.md index e16d82609..869d86ce7 100644 --- a/neuro-cli/docs/blob.md +++ b/neuro-cli/docs/blob.md @@ -13,36 +13,94 @@ Blob storage operations. **Commands:** | Usage | Description | | :--- | :--- | -| [_lsbucket_](blob.md#lsbucket) | List buckets | -| [_mkbucket_](blob.md#mkbucket) | Create a new bucket | +| [_cp_](blob.md#cp) | Copy blobs into and from Blob Storage | +| [_du_](blob.md#du) | Get storage usage for BUCKET | +| [_glob_](blob.md#glob) | List resources that match PATTERNS | | [_importbucket_](blob.md#importbucket) | Import an existing bucket | -| [_statbucket_](blob.md#statbucket) | Get bucket BUCKET | -| [_rmbucket_](blob.md#rmbucket) | Remove bucket BUCKET | -| [_set-bucket-publicity_](blob.md#set-bucket-publicity) | Change public access settings for BUCKET | +| [_ls_](blob.md#ls) | List buckets or bucket contents | +| [_lsbucket_](blob.md#lsbucket) | List buckets | | [_lscredentials_](blob.md#lscredentials) | List bucket credentials | +| [_mkbucket_](blob.md#mkbucket) | Create a new bucket | | [_mkcredentials_](blob.md#mkcredentials) | Create a new bucket credential | -| [_statcredentials_](blob.md#statcredentials) | Get bucket credential BUCKET\_CREDENTIAL | -| [_rmcredentials_](blob.md#rmcredentials) | Remove bucket credential BUCKET\_CREDENTIAL | -| [_cp_](blob.md#cp) | Copy blobs into and from Blob Storage | -| [_ls_](blob.md#ls) | List buckets or bucket contents | -| [_glob_](blob.md#glob) | List resources that match PATTERNS | | [_rm_](blob.md#rm) | Remove blobs from bucket | +| [_rmbucket_](blob.md#rmbucket) | Remove bucket BUCKET | +| [_rmcredentials_](blob.md#rmcredentials) | Remove bucket credential BUCKET\_CREDENTIAL | +| [_set-bucket-publicity_](blob.md#set-bucket-publicity) | Change public access settings for BUCKET | | [_sign-url_](blob.md#sign-url) | Make signed url for blob in bucket | -| [_du_](blob.md#du) | Get storage usage for BUCKET | +| [_statbucket_](blob.md#statbucket) | Get bucket BUCKET | +| [_statcredentials_](blob.md#statcredentials) | Get bucket credential BUCKET\_CREDENTIAL | -### lsbucket +### cp -List buckets +Copy blobs into and from Blob Storage #### Usage ```bash -neuro blob lsbucket [OPTIONS] +neuro blob cp [OPTIONS] [SOURCES]... [DESTINATION] ``` -List buckets. +Copy blobs into and from Blob Storage. + +Either `SOURCES` or `DESTINATION` +should have `blob://` scheme. +If scheme is omitted, file:// scheme is assumed. +It is currently not possible to +copy files between Blob Storage (`blob://`) +destination, nor with `storage://` +scheme paths. + +Use `/dev/stdin` and +`/dev/stdout` file names to upload a file from standard input +or output to +stdout. + +Any number of --exclude and --include options can be passed. The +filters that appear later in the command take precedence over filters +that +appear earlier in the command. If neither --exclude nor +--include options are +specified the default can be changed using the +storage.cp-exclude +configuration variable documented in +"neuro help user-config". + +File +permissions, modification times and other attributes will not be passed to +Blob Storage metadata during upload. + +#### Options + +| Name | Description | +| :--- | :--- | +| _--help_ | Show this message and exit. | +| _--continue_ | Continue copying partially-copied files. Only for copying from Blob Storage. | +| _--exclude-from-files FILES_ | A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp-exclude-from-files configuration variable documented in "neuro help user-config" | +| _--exclude_ | Exclude files and directories that match the specified pattern. | +| _--include_ | Don't exclude files and directories that match the specified pattern. | +| _--glob / --no-glob_ | Expand glob patterns in SOURCES with explicit scheme. _\[default: glob\]_ | +| _-T, --no-target-directory_ | Treat DESTINATION as a normal file. | +| _-p, --progress / -P, --no-progress_ | Show progress, on by default. | +| _-r, --recursive_ | Recursive copy, off by default | +| _-t, --target-directory DIRECTORY_ | Copy all SOURCES into DIRECTORY. | +| _-u, --update_ | Copy only when the SOURCE file is newer than the destination file or when the destination file is missing. | + + + +### du + +Get storage usage for BUCKET + + +#### Usage + +```bash +neuro blob du [OPTIONS] BUCKET +``` + +Get storage usage for `BUCKET`. #### Options @@ -50,32 +108,28 @@ List buckets. | :--- | :--- | | _--help_ | Show this message and exit. | | _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | -| _--full-uri_ | Output full bucket URI. | -| _--long-format_ | Output all info about bucket. | -### mkbucket +### glob -Create a new bucket +List resources that match PATTERNS #### Usage ```bash -neuro blob mkbucket [OPTIONS] +neuro blob glob [OPTIONS] [PATTERNS]... ``` -Create a new bucket. +List resources that match `PATTERNS`. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Perform in a specified cluster \(the current cluster by default\). | -| _--name NAME_ | Optional bucket name | -| _--org ORG_ | Perform in a specified org \(the current org by default\). | +| _--full-uri_ | Output full bucket URI. | @@ -113,100 +167,98 @@ Import an existing bucket. -### statbucket +### ls -Get bucket BUCKET +List buckets or bucket contents #### Usage ```bash -neuro blob statbucket [OPTIONS] BUCKET +neuro blob ls [OPTIONS] [PATHS]... ``` -Get bucket `BUCKET`. +List buckets or bucket contents. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | +| _-l_ | use a long listing format. | | _--full-uri_ | Output full bucket URI. | +| _-h, --human-readable_ | with -l print human readable sizes \(e.g., 2K, 540M\). | +| _-r, --recursive_ | List all keys under the URL path provided, not just 1 level depths. | -### rmbucket +### lsbucket -Remove bucket BUCKET +List buckets #### Usage ```bash -neuro blob rmbucket [OPTIONS] BUCKETS... +neuro blob lsbucket [OPTIONS] ``` -Remove bucket `BUCKET`. +List buckets. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Perform on a specified cluster \(the current cluster by default\). | +| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | +| _--full-uri_ | Output full bucket URI. | +| _--long-format_ | Output all info about bucket. | -### set-bucket-publicity +### lscredentials -Change public access settings for BUCKET +List bucket credentials #### Usage ```bash -neuro blob set-bucket-publicity [OPTIONS] BUCKET {public|private} +neuro blob lscredentials [OPTIONS] ``` -Change public access settings for `BUCKET` - -#### Examples - -```bash - -$ neuro blob set-bucket-publicity my-bucket public -$ neuro blob set-bucket-publicity my-bucket private -``` +List bucket credentials. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Perform on a specified cluster \(the current cluster by default\). | +| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | -### lscredentials +### mkbucket -List bucket credentials +Create a new bucket #### Usage ```bash -neuro blob lscredentials [OPTIONS] +neuro blob mkbucket [OPTIONS] ``` -List bucket credentials. +Create a new bucket. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | +| _--cluster CLUSTER_ | Perform in a specified cluster \(the current cluster by default\). | +| _--name NAME_ | Optional bucket name | +| _--org ORG_ | Perform in a specified org \(the current org by default\). | @@ -234,40 +286,42 @@ Create a new bucket credential. -### statcredentials +### rm -Get bucket credential BUCKET_CREDENTIAL +Remove blobs from bucket #### Usage ```bash -neuro blob statcredentials [OPTIONS] BUCKET_CREDENTIAL +neuro blob rm [OPTIONS] PATHS... ``` -Get bucket credential `BUCKET`_`CREDENTIAL`. +Remove blobs from bucket. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | +| _--glob / --no-glob_ | Expand glob patterns in PATHS _\[default: glob\]_ | +| _-p, --progress / -P, --no-progress_ | Show progress, on by default in TTY mode, off otherwise. | +| _-r, --recursive_ | remove directories and their contents recursively | -### rmcredentials +### rmbucket -Remove bucket credential BUCKET_CREDENTIAL +Remove bucket BUCKET #### Usage ```bash -neuro blob rmcredentials [OPTIONS] CREDENTIALS... +neuro blob rmbucket [OPTIONS] BUCKETS... ``` -Remove bucket credential `BUCKET`_`CREDENTIAL`. +Remove bucket `BUCKET`. #### Options @@ -278,169 +332,115 @@ Remove bucket credential `BUCKET`_`CREDENTIAL`. -### cp +### rmcredentials -Copy blobs into and from Blob Storage +Remove bucket credential BUCKET_CREDENTIAL #### Usage ```bash -neuro blob cp [OPTIONS] [SOURCES]... [DESTINATION] +neuro blob rmcredentials [OPTIONS] CREDENTIALS... ``` -Copy blobs into and from Blob Storage. - -Either `SOURCES` or `DESTINATION` -should have `blob://` scheme. -If scheme is omitted, file:// scheme is assumed. -It is currently not possible to -copy files between Blob Storage (`blob://`) -destination, nor with `storage://` -scheme paths. - -Use `/dev/stdin` and -`/dev/stdout` file names to upload a file from standard input -or output to -stdout. - -Any number of --exclude and --include options can be passed. The -filters that appear later in the command take precedence over filters -that -appear earlier in the command. If neither --exclude nor ---include options are -specified the default can be changed using the -storage.cp-exclude -configuration variable documented in -"neuro help user-config". - -File -permissions, modification times and other attributes will not be passed to -Blob Storage metadata during upload. +Remove bucket credential `BUCKET`_`CREDENTIAL`. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--continue_ | Continue copying partially-copied files. Only for copying from Blob Storage. | -| _--exclude-from-files FILES_ | A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp-exclude-from-files configuration variable documented in "neuro help user-config" | -| _--exclude_ | Exclude files and directories that match the specified pattern. | -| _--include_ | Don't exclude files and directories that match the specified pattern. | -| _--glob / --no-glob_ | Expand glob patterns in SOURCES with explicit scheme. _\[default: glob\]_ | -| _-T, --no-target-directory_ | Treat DESTINATION as a normal file. | -| _-p, --progress / -P, --no-progress_ | Show progress, on by default. | -| _-r, --recursive_ | Recursive copy, off by default | -| _-t, --target-directory DIRECTORY_ | Copy all SOURCES into DIRECTORY. | -| _-u, --update_ | Copy only when the SOURCE file is newer than the destination file or when the destination file is missing. | +| _--cluster CLUSTER_ | Perform on a specified cluster \(the current cluster by default\). | -### ls +### set-bucket-publicity -List buckets or bucket contents +Change public access settings for BUCKET #### Usage ```bash -neuro blob ls [OPTIONS] [PATHS]... +neuro blob set-bucket-publicity [OPTIONS] BUCKET {public|private} ``` -List buckets or bucket contents. - -#### Options - -| Name | Description | -| :--- | :--- | -| _--help_ | Show this message and exit. | -| _-l_ | use a long listing format. | -| _--full-uri_ | Output full bucket URI. | -| _-h, --human-readable_ | with -l print human readable sizes \(e.g., 2K, 540M\). | -| _-r, --recursive_ | List all keys under the URL path provided, not just 1 level depths. | - - - -### glob - -List resources that match PATTERNS - +Change public access settings for `BUCKET` -#### Usage +#### Examples ```bash -neuro blob glob [OPTIONS] [PATTERNS]... -``` -List resources that match `PATTERNS`. +$ neuro blob set-bucket-publicity my-bucket public +$ neuro blob set-bucket-publicity my-bucket private +``` #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--full-uri_ | Output full bucket URI. | +| _--cluster CLUSTER_ | Perform on a specified cluster \(the current cluster by default\). | -### rm +### sign-url -Remove blobs from bucket +Make signed url for blob in bucket #### Usage ```bash -neuro blob rm [OPTIONS] PATHS... +neuro blob sign-url [OPTIONS] PATH ``` -Remove blobs from bucket. +Make signed url for blob in bucket. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--glob / --no-glob_ | Expand glob patterns in PATHS _\[default: glob\]_ | -| _-p, --progress / -P, --no-progress_ | Show progress, on by default in TTY mode, off otherwise. | -| _-r, --recursive_ | remove directories and their contents recursively | +| _--expires TIMEDELTA_ | Duration this signature will be valid in the format '1h2m3s' _\[default: 1h\]_ | -### sign-url +### statbucket -Make signed url for blob in bucket +Get bucket BUCKET #### Usage ```bash -neuro blob sign-url [OPTIONS] PATH +neuro blob statbucket [OPTIONS] BUCKET ``` -Make signed url for blob in bucket. +Get bucket `BUCKET`. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--expires TIMEDELTA_ | Duration this signature will be valid in the format '1h2m3s' _\[default: 1h\]_ | +| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | +| _--full-uri_ | Output full bucket URI. | -### du +### statcredentials -Get storage usage for BUCKET +Get bucket credential BUCKET_CREDENTIAL #### Usage ```bash -neuro blob du [OPTIONS] BUCKET +neuro blob statcredentials [OPTIONS] BUCKET_CREDENTIAL ``` -Get storage usage for `BUCKET`. +Get bucket credential `BUCKET`_`CREDENTIAL`. #### Options diff --git a/neuro-cli/docs/config.md b/neuro-cli/docs/config.md index d3d9fe463..1202a45af 100644 --- a/neuro-cli/docs/config.md +++ b/neuro-cli/docs/config.md @@ -13,33 +13,31 @@ Client configuration. **Commands:** | Usage | Description | | :--- | :--- | +| [_aliases_](config.md#aliases) | List available command aliases | +| [_docker_](config.md#docker) | Configure local docker client | +| [_get-clusters_](config.md#get-clusters) | List available clusters/org pairs | | [_login_](config.md#login) | Log into Neuro Platform | -| [_login-with-token_](config.md#login-with-token) | Log into Neuro Platform with token | | [_login-headless_](config.md#login-headless) | Log into Neuro Platform in non-GUI environ | +| [_login-with-token_](config.md#login-with-token) | Log into Neuro Platform with token | +| [_logout_](config.md#logout) | Log out | | [_show_](config.md#show) | Print current settings | | [_show-token_](config.md#show-token) | Print current authorization token | -| [_aliases_](config.md#aliases) | List available command aliases | -| [_get-clusters_](config.md#get-clusters) | List available clusters/org pairs | | [_switch-cluster_](config.md#switch-cluster) | Switch the active cluster | | [_switch-org_](config.md#switch-org) | Switch the active organization | -| [_docker_](config.md#docker) | Configure local docker client | -| [_logout_](config.md#logout) | Log out | -### login +### aliases -Log into Neuro Platform +List available command aliases #### Usage ```bash -neuro config login [OPTIONS] [URL] +neuro config aliases [OPTIONS] ``` -Log into Neuro Platform. - -`URL` is a platform entrypoint `URL`. +List available command aliases. #### Options @@ -49,56 +47,47 @@ Log into Neuro Platform. -### login-with-token +### docker -Log into Neuro Platform with token +Configure local docker client #### Usage ```bash -neuro config login-with-token [OPTIONS] TOKEN [URL] +neuro config docker [OPTIONS] ``` -Log into Neuro Platform with token. +Configure local docker client -`TOKEN` is authentication token provided -by administration team. -`URL` is a platform entrypoint `URL`. +This command configures local docker client to +use Neuro Platform's docker registry. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--docker-config PATH_ | Specifies the location of the Docker client configuration files | -### login-headless +### get-clusters -Log into Neuro Platform in non-GUI environ +List available clusters/org pairs #### Usage ```bash -neuro config login-headless [OPTIONS] [URL] +neuro config get-clusters [OPTIONS] ``` -Log into Neuro Platform in non`-GUI` environ - -`URL` is a platform entrypoint -`URL`. - -The command works similar to "neuro login" but instead of -opening a -browser for performing OAuth registration prints -an `URL` that should be open -on guest host. +List available clusters/org pairs. -Then user inputs a code displayed in a browser after -successful login -back in neuro command to finish the login process. +This command re-fetches cluster list and +then displays each +cluster with available orgs. #### Options @@ -108,18 +97,20 @@ back in neuro command to finish the login process. -### show +### login -Print current settings +Log into Neuro Platform #### Usage ```bash -neuro config show [OPTIONS] +neuro config login [OPTIONS] [URL] ``` -Print current settings. +Log into Neuro Platform. + +`URL` is a platform entrypoint `URL`. #### Options @@ -129,18 +120,31 @@ Print current settings. -### show-token +### login-headless -Print current authorization token +Log into Neuro Platform in non-GUI environ #### Usage ```bash -neuro config show-token [OPTIONS] +neuro config login-headless [OPTIONS] [URL] ``` -Print current authorization token. +Log into Neuro Platform in non`-GUI` environ + +`URL` is a platform entrypoint +`URL`. + +The command works similar to "neuro login" but instead of +opening a +browser for performing OAuth registration prints +an `URL` that should be open +on guest host. + +Then user inputs a code displayed in a browser after +successful login +back in neuro command to finish the login process. #### Options @@ -150,18 +154,22 @@ Print current authorization token. -### aliases +### login-with-token -List available command aliases +Log into Neuro Platform with token #### Usage ```bash -neuro config aliases [OPTIONS] +neuro config login-with-token [OPTIONS] TOKEN [URL] ``` -List available command aliases. +Log into Neuro Platform with token. + +`TOKEN` is authentication token provided +by administration team. +`URL` is a platform entrypoint `URL`. #### Options @@ -171,22 +179,18 @@ List available command aliases. -### get-clusters +### logout -List available clusters/org pairs +Log out #### Usage ```bash -neuro config get-clusters [OPTIONS] +neuro config logout [OPTIONS] ``` -List available clusters/org pairs. - -This command re-fetches cluster list and -then displays each -cluster with available orgs. +Log out. #### Options @@ -196,22 +200,18 @@ cluster with available orgs. -### switch-cluster +### show -Switch the active cluster +Print current settings #### Usage ```bash -neuro config switch-cluster [OPTIONS] [CLUSTER_NAME] +neuro config show [OPTIONS] ``` -Switch the active cluster. - -`CLUSTER`_`NAME` is the cluster name to select. -The interactive prompt is used if the -name is omitted (default). +Print current settings. #### Options @@ -221,23 +221,18 @@ name is omitted (default). -### switch-org +### show-token -Switch the active organization +Print current authorization token #### Usage ```bash -neuro config switch-org [OPTIONS] ORG_NAME +neuro config show-token [OPTIONS] ``` -Switch the active organization. - -`ORG`_`NAME` is the organization name to -select. Use literal "NO_`ORG`" to switch -to using current cluster directly -instead of on behalf of some org. +Print current authorization token. #### Options @@ -247,43 +242,48 @@ instead of on behalf of some org. -### docker +### switch-cluster -Configure local docker client +Switch the active cluster #### Usage ```bash -neuro config docker [OPTIONS] +neuro config switch-cluster [OPTIONS] [CLUSTER_NAME] ``` -Configure local docker client +Switch the active cluster. -This command configures local docker client to -use Neuro Platform's docker registry. +`CLUSTER`_`NAME` is the cluster name to select. +The interactive prompt is used if the +name is omitted (default). #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--docker-config PATH_ | Specifies the location of the Docker client configuration files | -### logout +### switch-org -Log out +Switch the active organization #### Usage ```bash -neuro config logout [OPTIONS] +neuro config switch-org [OPTIONS] ORG_NAME ``` -Log out. +Switch the active organization. + +`ORG`_`NAME` is the organization name to +select. Use literal "NO_`ORG`" to switch +to using current cluster directly +instead of on behalf of some org. #### Options diff --git a/neuro-cli/docs/disk.md b/neuro-cli/docs/disk.md index 6a90650bf..37f020e78 100644 --- a/neuro-cli/docs/disk.md +++ b/neuro-cli/docs/disk.md @@ -13,36 +13,12 @@ Operations with disks. **Commands:** | Usage | Description | | :--- | :--- | -| [_ls_](disk.md#ls) | List disks | | [_create_](disk.md#create) | Create a disk | | [_get_](disk.md#get) | Get disk DISK\_ID | +| [_ls_](disk.md#ls) | List disks | | [_rm_](disk.md#rm) | Remove disk DISK\_ID | -### ls - -List disks - - -#### Usage - -```bash -neuro disk ls [OPTIONS] -``` - -List disks. - -#### Options - -| Name | Description | -| :--- | :--- | -| _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | -| _--full-uri_ | Output full disk URI. | -| _--long-format_ | Output all info about disk. | - - - ### create Create a disk @@ -115,6 +91,30 @@ Get disk `DISK`_ID. +### ls + +List disks + + +#### Usage + +```bash +neuro disk ls [OPTIONS] +``` + +List disks. + +#### Options + +| Name | Description | +| :--- | :--- | +| _--help_ | Show this message and exit. | +| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | +| _--full-uri_ | Output full disk URI. | +| _--long-format_ | Output all info about disk. | + + + ### rm Remove disk DISK_ID diff --git a/neuro-cli/docs/image.md b/neuro-cli/docs/image.md index 335a553b4..971e11282 100644 --- a/neuro-cli/docs/image.md +++ b/neuro-cli/docs/image.md @@ -13,74 +13,71 @@ Container image operations. **Commands:** | Usage | Description | | :--- | :--- | +| [_digest_](image.md#digest) | Get digest of an image from remote registry | | [_ls_](image.md#ls) | List images | -| [_push_](image.md#push) | Push an image to platform registry | | [_pull_](image.md#pull) | Pull an image from platform registry | +| [_push_](image.md#push) | Push an image to platform registry | | [_rm_](image.md#rm) | Remove image from platform registry | | [_size_](image.md#size) | Get image size | -| [_digest_](image.md#digest) | Get digest of an image from remote registry | | [_tags_](image.md#tags) | List tags for image in platform registry | -### ls +### digest -List images +Get digest of an image from remote registry #### Usage ```bash -neuro image ls [OPTIONS] +neuro image digest [OPTIONS] IMAGE ``` -List images. +Get digest of an image from remote registry + +Image name must be `URL` with +image:// scheme. +Image name must contain tag. + +#### Examples + +```bash + +$ neuro image digest image://myfriend/alpine:shared +$ neuro image digest image:myimage:latest +``` #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Show images on a specified cluster \(the current cluster by default\). | -| _-l_ | List in long format. | -| _--full-uri_ | Output full image URI. | -| _-n, --name PATTERN_ | Filter out images by name regex. | -| _-o, --owner TEXT_ | Filter out images by owner \(multiple option\). Supports `ME` option to filter by the current user. | -### push +### ls -Push an image to platform registry +List images #### Usage ```bash -neuro image push [OPTIONS] LOCAL_IMAGE [REMOTE_IMAGE] +neuro image ls [OPTIONS] ``` -Push an image to platform registry. - -Remote image must be `URL` with image:// -scheme. -Image names can contain tag. If tags not specified 'latest' will -be -used as value. - -#### Examples - -```bash - -$ neuro push myimage -$ neuro push alpine:latest image:my-alpine:production -$ neuro push alpine image://myfriend/alpine:shared -``` +List images. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--cluster CLUSTER_ | Show images on a specified cluster \(the current cluster by default\). | +| _-l_ | List in long format. | +| _--full-uri_ | Output full image URI. | +| _-n, --name PATTERN_ | Filter out images by name regex. | +| _-o, --owner TEXT_ | Filter out images by owner \(multiple option\). Supports `ME` option to filter by the current user. | @@ -118,29 +115,32 @@ $ neuro pull image://username/my-alpine:production alpine:from-registry -### rm +### push -Remove image from platform registry +Push an image to platform registry #### Usage ```bash -neuro image rm [OPTIONS] IMAGES... +neuro image push [OPTIONS] LOCAL_IMAGE [REMOTE_IMAGE] ``` -Remove image from platform registry. +Push an image to platform registry. -Image name must be `URL` with image:// +Remote image must be `URL` with image:// scheme. -Image name must contain tag. +Image names can contain tag. If tags not specified 'latest' will +be +used as value. #### Examples ```bash -$ neuro image rm image://myfriend/alpine:shared -$ neuro image rm image:myimage:latest +$ neuro push myimage +$ neuro push alpine:latest image:my-alpine:production +$ neuro push alpine image://myfriend/alpine:shared ``` #### Options @@ -148,33 +148,32 @@ $ neuro image rm image:myimage:latest | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-f_ | Force deletion of all tags referencing the image. | -### size +### rm -Get image size +Remove image from platform registry #### Usage ```bash -neuro image size [OPTIONS] IMAGE +neuro image rm [OPTIONS] IMAGES... ``` -Get image size +Remove image from platform registry. -Image name must be `URL` with image:// scheme. -Image name must -contain tag. +Image name must be `URL` with image:// +scheme. +Image name must contain tag. #### Examples ```bash -$ neuro image size image://myfriend/alpine:shared -$ neuro image size image:myimage:latest +$ neuro image rm image://myfriend/alpine:shared +$ neuro image rm image:myimage:latest ``` #### Options @@ -182,32 +181,33 @@ $ neuro image size image:myimage:latest | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _-f_ | Force deletion of all tags referencing the image. | -### digest +### size -Get digest of an image from remote registry +Get image size #### Usage ```bash -neuro image digest [OPTIONS] IMAGE +neuro image size [OPTIONS] IMAGE ``` -Get digest of an image from remote registry +Get image size -Image name must be `URL` with -image:// scheme. -Image name must contain tag. +Image name must be `URL` with image:// scheme. +Image name must +contain tag. #### Examples ```bash -$ neuro image digest image://myfriend/alpine:shared -$ neuro image digest image:myimage:latest +$ neuro image size image://myfriend/alpine:shared +$ neuro image size image:myimage:latest ``` #### Options diff --git a/neuro-cli/docs/job.md b/neuro-cli/docs/job.md index dc49edeff..f93934096 100644 --- a/neuro-cli/docs/job.md +++ b/neuro-cli/docs/job.md @@ -13,184 +13,85 @@ Job operations. **Commands:** | Usage | Description | | :--- | :--- | -| [_run_](job.md#run) | Run a job | +| [_attach_](job.md#attach) | Attach terminal to a job | +| [_browse_](job.md#browse) | Opens a job's URL in a web browser | +| [_bump-life-span_](job.md#bump-life-span) | Increase job life span | +| [_exec_](job.md#exec) | Execute command in a running job | | [_generate-run-command_](job.md#generate-run-command) | Generate command that will rerun given job | +| [_kill_](job.md#kill) | Kill job\(s\) | +| [_logs_](job.md#logs) | Print the logs for a job | | [_ls_](job.md#ls) | List all jobs | -| [_status_](job.md#status) | Display status of a job | -| [_exec_](job.md#exec) | Execute command in a running job | | [_port-forward_](job.md#port-forward) | Forward port\(s\) of a job | -| [_logs_](job.md#logs) | Print the logs for a job | -| [_kill_](job.md#kill) | Kill job\(s\) | -| [_top_](job.md#top) | Display GPU/CPU/Memory usage | +| [_run_](job.md#run) | Run a job | | [_save_](job.md#save) | Save job's state to an image | -| [_browse_](job.md#browse) | Opens a job's URL in a web browser | -| [_attach_](job.md#attach) | Attach terminal to a job | -| [_bump-life-span_](job.md#bump-life-span) | Increase job life span | +| [_status_](job.md#status) | Display status of a job | +| [_top_](job.md#top) | Display GPU/CPU/Memory usage | -### run +### attach -Run a job +Attach terminal to a job #### Usage ```bash -neuro job run [OPTIONS] IMAGE [-- CMD...] +neuro job attach [OPTIONS] JOB ``` -Run a job - -`IMAGE` docker image name to run in a job. - -`CMD` list will be -passed as arguments to the executed job's image. - -#### Examples - -```bash - -# Starts a container pytorch:latest on a machine with smaller GPU resources -# (see exact values in `neuro config show`) and with two volumes mounted: -# storage:/ --> /var/storage/home (in read-write mode), -# storage:/neuromation/public --> /var/storage/neuromation (in read-only mode). -$ neuro run --preset=gpu-small --volume=storage::/var/storage/home:rw \ -$ --volume=storage:/neuromation/public:/var/storage/home:ro pytorch:latest +Attach terminal to a job -# Starts a container using the custom image my-ubuntu:latest stored in neuro -# registry, run /script.sh and pass arg1 and arg2 as its arguments: -$ neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 arg2 -``` +Attach local standard input, output, and error +streams to a running job. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--browse_ | Open a job's URL in a web browser | -| _--cluster CLUSTER_ | Run job in a specified cluster | -| _-d, --description DESC_ | Optional job description in free format | -| _--detach_ | Don't attach to job logs and don't wait for exit code | -| _--entrypoint TEXT_ | Executable entrypoint in the container \(note that it overwrites `ENTRYPOINT` and `CMD` instructions of the docker image\) | -| _-e, --env VAR=VAL_ | Set environment variable in container. Use multiple options to define more than one variable. See `neuro help secrets` for information about passing secrets as environment variables. | -| _--env-file PATH_ | File with environment variables to pass | -| _-x, --extshm / -X, --no-extshm_ | Request extended '/dev/shm' space _\[default: x\]_ | -| _--http PORT_ | Enable HTTP port forwarding to container _\[default: 80\]_ | -| _--http-auth / --no-http-auth_ | Enable HTTP authentication for forwarded HTTP port _\[default: True\]_ | -| _--life-span TIMEDELTA_ | Optional job run-time limit in the format '1d2h3m4s' \(some parts may be missing\). Set '0' to disable. Default value '1d' can be changed in the user config. | -| _-n, --name NAME_ | Optional job name | -| _--org ORG_ | Run job in a specified org | -| _--pass-config / --no-pass-config_ | Upload neuro config to the job _\[default: no-pass-config\]_ | | _--port-forward LOCAL\_PORT:REMOTE\_RORT_ | Forward port\(s\) of a running job to local port\(s\) \(use multiple times for forwarding several ports\) | -| _-s, --preset PRESET_ | Predefined resource configuration \(to see available values, run `neuro config show`\) | -| _--privileged_ | Run job in privileged mode, if it is supported by cluster. _\[default: False\]_ | -| _--restart \[never | on-failure | always\]_ | Restart policy to apply when a job exits _\[default: never\]_ | -| _--schedule-timeout TIMEDELTA_ | Optional job schedule timeout in the format '3m4s' \(some parts may be missing\). | -| _--share USER_ | Share job write permissions to user or role. | -| _--tag TAG_ | Optional job tag, multiple values allowed | -| _-t, --tty / -T, --no-tty_ | Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script. | -| _-v, --volume MOUNT_ | Mounts directory from vault into container. Use multiple options to mount more than one volume. See `neuro help secrets` for information about passing secrets as mounted files. | -| _--wait-for-seat / --no-wait-for-seat_ | Wait for total running jobs quota _\[default: no-wait-for-seat\]_ | -| _--wait-start / --no-wait-start_ | Wait for a job start or failure _\[default: wait-start\]_ | -| _-w, --workdir TEXT_ | Working directory inside the container | - - - -### generate-run-command - -Generate command that will rerun given job -#### Usage -```bash -neuro job generate-run-command [OPTIONS] JOB -``` - -Generate command that will rerun given job. - -#### Examples - -```bash - -# You can use the following to directly re-execute it: -$ eval $(neuro job generate-run-command ) -``` - -#### Options - -| Name | Description | -| :--- | :--- | -| _--help_ | Show this message and exit. | - - - -### ls +### browse -List all jobs +Opens a job's URL in a web browser #### Usage ```bash -neuro job ls [OPTIONS] +neuro job browse [OPTIONS] JOB ``` -List all jobs. - -#### Examples - -```bash - -$ neuro ps -a -$ neuro ps -a --owner=user-1 --owner=user-2 -$ neuro ps --name my-experiments-v1 -s failed -s succeeded -$ neuro ps --description=my favourite job -$ neuro ps -s failed -s succeeded -q -$ neuro ps -t tag1 -t tag2 -``` +Opens a job's `URL` in a web browser. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-a, --all_ | Show all jobs regardless the status. | -| _--cluster CLUSTER_ | Show jobs on a specified cluster \(the current cluster by default\). | -| _-d, --description DESCRIPTION_ | Filter out jobs by description \(exact match\). | -| _--distinct_ | Show only first job if names are same. | -| _--format COLUMNS_ | Output table format, see "neuro help ps-format" for more info about the format specification. The default can be changed using the job.ps-format configuration variable documented in "neuro help user-config" | -| _--full-uri_ | Output full image URI. | -| _-n, --name NAME_ | Filter out jobs by name. | -| _-o, --owner TEXT_ | Filter out jobs by owner \(multiple option\). Supports `ME` option to filter by the current user. | -| _--recent-first / --recent-last_ | Show newer jobs first or last | -| _--since DATE\_OR\_TIMEDELTA_ | Show jobs created after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | -| _-s, --status \[pending | suspended | running | succeeded | failed | cancelled\]_ | Filter out jobs by status \(multiple option\). | -| _-t, --tag TAG_ | Filter out jobs by tag \(multiple option\) | -| _--until DATE\_OR\_TIMEDELTA_ | Show jobs created before a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | -| _-w, --wide_ | Do not cut long lines for terminal width. | -### status +### bump-life-span -Display status of a job +Increase job life span #### Usage ```bash -neuro job status [OPTIONS] JOB +neuro job bump-life-span [OPTIONS] JOB TIMEDELTA ``` -Display status of a job. +Increase job life span #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--full-uri_ | Output full URI. | @@ -227,37 +128,25 @@ $ neuro exec --no-tty my-job -- ls -l -### port-forward +### generate-run-command -Forward port(s) of a job +Generate command that will rerun given job #### Usage ```bash -neuro job port-forward [OPTIONS] JOB LOCAL_PORT:REMOTE_RORT... +neuro job generate-run-command [OPTIONS] JOB ``` -Forward port(s) of a job. - -Forwards port(s) of a running job to local port(s). +Generate command that will rerun given job. #### Examples ```bash -# Forward local port 2080 to port 80 of job's container. -# You can use http://localhost:2080 in browser to access job's served http -$ neuro job port-forward my-fastai-job 2080:80 - -# Forward local port 2222 to job's port 22 -# Then copy all data from container's folder '/data' to current folder -# (please run second command in other terminal) -$ neuro job port-forward my-job-with-ssh-server 2222:22 -$ rsync -avxzhe ssh -p 2222 root@localhost:/data . - -# Forward few ports at once -$ neuro job port-forward my-job 2080:80 2222:22 2000:100 +# You can use the following to directly re-execute it: +$ eval $(neuro job generate-run-command ) ``` #### Options @@ -268,72 +157,73 @@ $ neuro job port-forward my-job 2080:80 2222:22 2000:100 -### logs +### kill -Print the logs for a job +Kill job(s) #### Usage ```bash -neuro job logs [OPTIONS] JOB +neuro job kill [OPTIONS] JOBS... ``` -Print the logs for a job. +Kill job(s). #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--since DATE\_OR\_TIMEDELTA_ | Only return logs after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | -| _--timestamps_ | Include timestamps on each line in the log output. | -### kill +### logs -Kill job(s) +Print the logs for a job #### Usage ```bash -neuro job kill [OPTIONS] JOBS... +neuro job logs [OPTIONS] JOB ``` -Kill job(s). +Print the logs for a job. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--since DATE\_OR\_TIMEDELTA_ | Only return logs after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | +| _--timestamps_ | Include timestamps on each line in the log output. | -### top +### ls -Display GPU/CPU/Memory usage +List all jobs #### Usage ```bash -neuro job top [OPTIONS] [JOBS]... +neuro job ls [OPTIONS] ``` -Display `GPU`/`CPU`/Memory usage. +List all jobs. #### Examples ```bash -$ neuro top -$ neuro top job-1 job-2 -$ neuro top --owner=user-1 --owner=user-2 -$ neuro top --name my-experiments-v1 -$ neuro top -t tag1 -t tag2 +$ neuro ps -a +$ neuro ps -a --owner=user-1 --owner=user-2 +$ neuro ps --name my-experiments-v1 -s failed -s succeeded +$ neuro ps --description=my favourite job +$ neuro ps -s failed -s succeeded -q +$ neuro ps -t tag1 -t tag2 ``` #### Options @@ -341,39 +231,54 @@ $ neuro top -t tag1 -t tag2 | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _-a, --all_ | Show all jobs regardless the status. | | _--cluster CLUSTER_ | Show jobs on a specified cluster \(the current cluster by default\). | | _-d, --description DESCRIPTION_ | Filter out jobs by description \(exact match\). | -| _--format COLUMNS_ | Output table format, see "neuro help top-format" for more info about the format specification. The default can be changed using the job.top-format configuration variable documented in "neuro help user-config" | +| _--distinct_ | Show only first job if names are same. | +| _--format COLUMNS_ | Output table format, see "neuro help ps-format" for more info about the format specification. The default can be changed using the job.ps-format configuration variable documented in "neuro help user-config" | | _--full-uri_ | Output full image URI. | | _-n, --name NAME_ | Filter out jobs by name. | -| _-o, --owner TEXT_ | Filter out jobs by owner \(multiple option\). Supports `ME` option to filter by the current user. Specify `ALL` to show jobs of all users. | +| _-o, --owner TEXT_ | Filter out jobs by owner \(multiple option\). Supports `ME` option to filter by the current user. | +| _--recent-first / --recent-last_ | Show newer jobs first or last | | _--since DATE\_OR\_TIMEDELTA_ | Show jobs created after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | -| _--sort COLUMNS_ | Sort rows by specified column. Add "-" prefix to revert the sorting order. Multiple columns can be specified \(comma separated\). _\[default: cpu\]_ | +| _-s, --status \[pending | suspended | running | succeeded | failed | cancelled\]_ | Filter out jobs by status \(multiple option\). | | _-t, --tag TAG_ | Filter out jobs by tag \(multiple option\) | -| _--timeout FLOAT_ | Maximum allowed time for executing the command, 0 for no timeout _\[default: 0\]_ | | _--until DATE\_OR\_TIMEDELTA_ | Show jobs created before a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | +| _-w, --wide_ | Do not cut long lines for terminal width. | -### save +### port-forward -Save job's state to an image +Forward port(s) of a job #### Usage ```bash -neuro job save [OPTIONS] JOB IMAGE +neuro job port-forward [OPTIONS] JOB LOCAL_PORT:REMOTE_RORT... ``` -Save job's state to an image. +Forward port(s) of a job. + +Forwards port(s) of a running job to local port(s). #### Examples ```bash -$ neuro job save job-id image:ubuntu-patched -$ neuro job save my-favourite-job image:ubuntu-patched:v1 -$ neuro job save my-favourite-job image://bob/ubuntu-patched + +# Forward local port 2080 to port 80 of job's container. +# You can use http://localhost:2080 in browser to access job's served http +$ neuro job port-forward my-fastai-job 2080:80 + +# Forward local port 2222 to job's port 22 +# Then copy all data from container's folder '/data' to current folder +# (please run second command in other terminal) +$ neuro job port-forward my-job-with-ssh-server 2222:22 +$ rsync -avxzhe ssh -p 2222 root@localhost:/data . + +# Forward few ports at once +$ neuro job port-forward my-job 2080:80 2222:22 2000:100 ``` #### Options @@ -384,69 +289,164 @@ $ neuro job save my-favourite-job image://bob/ubuntu-patched -### browse +### run -Opens a job's URL in a web browser +Run a job #### Usage ```bash -neuro job browse [OPTIONS] JOB +neuro job run [OPTIONS] IMAGE [-- CMD...] ``` -Opens a job's `URL` in a web browser. +Run a job + +`IMAGE` docker image name to run in a job. + +`CMD` list will be +passed as arguments to the executed job's image. + +#### Examples + +```bash + +# Starts a container pytorch:latest on a machine with smaller GPU resources +# (see exact values in `neuro config show`) and with two volumes mounted: +# storage:/ --> /var/storage/home (in read-write mode), +# storage:/neuromation/public --> /var/storage/neuromation (in read-only mode). +$ neuro run --preset=gpu-small --volume=storage::/var/storage/home:rw \ +$ --volume=storage:/neuromation/public:/var/storage/home:ro pytorch:latest + +# Starts a container using the custom image my-ubuntu:latest stored in neuro +# registry, run /script.sh and pass arg1 and arg2 as its arguments: +$ neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 arg2 +``` #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--browse_ | Open a job's URL in a web browser | +| _--cluster CLUSTER_ | Run job in a specified cluster | +| _-d, --description DESC_ | Optional job description in free format | +| _--detach_ | Don't attach to job logs and don't wait for exit code | +| _--entrypoint TEXT_ | Executable entrypoint in the container \(note that it overwrites `ENTRYPOINT` and `CMD` instructions of the docker image\) | +| _-e, --env VAR=VAL_ | Set environment variable in container. Use multiple options to define more than one variable. See `neuro help secrets` for information about passing secrets as environment variables. | +| _--env-file PATH_ | File with environment variables to pass | +| _-x, --extshm / -X, --no-extshm_ | Request extended '/dev/shm' space _\[default: x\]_ | +| _--http PORT_ | Enable HTTP port forwarding to container _\[default: 80\]_ | +| _--http-auth / --no-http-auth_ | Enable HTTP authentication for forwarded HTTP port _\[default: True\]_ | +| _--life-span TIMEDELTA_ | Optional job run-time limit in the format '1d2h3m4s' \(some parts may be missing\). Set '0' to disable. Default value '1d' can be changed in the user config. | +| _-n, --name NAME_ | Optional job name | +| _--org ORG_ | Run job in a specified org | +| _--pass-config / --no-pass-config_ | Upload neuro config to the job _\[default: no-pass-config\]_ | +| _--port-forward LOCAL\_PORT:REMOTE\_RORT_ | Forward port\(s\) of a running job to local port\(s\) \(use multiple times for forwarding several ports\) | +| _-s, --preset PRESET_ | Predefined resource configuration \(to see available values, run `neuro config show`\) | +| _--privileged_ | Run job in privileged mode, if it is supported by cluster. _\[default: False\]_ | +| _--restart \[never | on-failure | always\]_ | Restart policy to apply when a job exits _\[default: never\]_ | +| _--schedule-timeout TIMEDELTA_ | Optional job schedule timeout in the format '3m4s' \(some parts may be missing\). | +| _--share USER_ | Share job write permissions to user or role. | +| _--tag TAG_ | Optional job tag, multiple values allowed | +| _-t, --tty / -T, --no-tty_ | Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script. | +| _-v, --volume MOUNT_ | Mounts directory from vault into container. Use multiple options to mount more than one volume. See `neuro help secrets` for information about passing secrets as mounted files. | +| _--wait-for-seat / --no-wait-for-seat_ | Wait for total running jobs quota _\[default: no-wait-for-seat\]_ | +| _--wait-start / --no-wait-start_ | Wait for a job start or failure _\[default: wait-start\]_ | +| _-w, --workdir TEXT_ | Working directory inside the container | -### attach +### save -Attach terminal to a job +Save job's state to an image #### Usage ```bash -neuro job attach [OPTIONS] JOB +neuro job save [OPTIONS] JOB IMAGE ``` -Attach terminal to a job +Save job's state to an image. -Attach local standard input, output, and error -streams to a running job. +#### Examples + +```bash +$ neuro job save job-id image:ubuntu-patched +$ neuro job save my-favourite-job image:ubuntu-patched:v1 +$ neuro job save my-favourite-job image://bob/ubuntu-patched +``` #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--port-forward LOCAL\_PORT:REMOTE\_RORT_ | Forward port\(s\) of a running job to local port\(s\) \(use multiple times for forwarding several ports\) | -### bump-life-span +### status -Increase job life span +Display status of a job #### Usage ```bash -neuro job bump-life-span [OPTIONS] JOB TIMEDELTA +neuro job status [OPTIONS] JOB ``` -Increase job life span +Display status of a job. + +#### Options + +| Name | Description | +| :--- | :--- | +| _--help_ | Show this message and exit. | +| _--full-uri_ | Output full URI. | + + + +### top + +Display GPU/CPU/Memory usage + + +#### Usage + +```bash +neuro job top [OPTIONS] [JOBS]... +``` + +Display `GPU`/`CPU`/Memory usage. + +#### Examples + +```bash + +$ neuro top +$ neuro top job-1 job-2 +$ neuro top --owner=user-1 --owner=user-2 +$ neuro top --name my-experiments-v1 +$ neuro top -t tag1 -t tag2 +``` #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--cluster CLUSTER_ | Show jobs on a specified cluster \(the current cluster by default\). | +| _-d, --description DESCRIPTION_ | Filter out jobs by description \(exact match\). | +| _--format COLUMNS_ | Output table format, see "neuro help top-format" for more info about the format specification. The default can be changed using the job.top-format configuration variable documented in "neuro help user-config" | +| _--full-uri_ | Output full image URI. | +| _-n, --name NAME_ | Filter out jobs by name. | +| _-o, --owner TEXT_ | Filter out jobs by owner \(multiple option\). Supports `ME` option to filter by the current user. Specify `ALL` to show jobs of all users. | +| _--since DATE\_OR\_TIMEDELTA_ | Show jobs created after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | +| _--sort COLUMNS_ | Sort rows by specified column. Add "-" prefix to revert the sorting order. Multiple columns can be specified \(comma separated\). _\[default: cpu\]_ | +| _-t, --tag TAG_ | Filter out jobs by tag \(multiple option\) | +| _--timeout FLOAT_ | Maximum allowed time for executing the command, 0 for no timeout _\[default: 0\]_ | +| _--until DATE\_OR\_TIMEDELTA_ | Show jobs created before a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | diff --git a/neuro-cli/docs/secret.md b/neuro-cli/docs/secret.md index eb680f813..6aa80059f 100644 --- a/neuro-cli/docs/secret.md +++ b/neuro-cli/docs/secret.md @@ -13,34 +13,11 @@ Operations with secrets. **Commands:** | Usage | Description | | :--- | :--- | -| [_ls_](secret.md#ls) | List secrets | | [_add_](secret.md#add) | Add secret KEY with data VALUE | +| [_ls_](secret.md#ls) | List secrets | | [_rm_](secret.md#rm) | Remove secret KEY | -### ls - -List secrets - - -#### Usage - -```bash -neuro secret ls [OPTIONS] -``` - -List secrets. - -#### Options - -| Name | Description | -| :--- | :--- | -| _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | -| _--full-uri_ | Output full disk URI. | - - - ### add Add secret KEY with data VALUE @@ -75,6 +52,29 @@ $ neuro secret add KEY_NAME @path/to/file.txt +### ls + +List secrets + + +#### Usage + +```bash +neuro secret ls [OPTIONS] +``` + +List secrets. + +#### Options + +| Name | Description | +| :--- | :--- | +| _--help_ | Show this message and exit. | +| _--cluster CLUSTER_ | Look on a specified cluster \(the current cluster by default\). | +| _--full-uri_ | Output full disk URI. | + + + ### rm Remove secret KEY diff --git a/neuro-cli/docs/service-account.md b/neuro-cli/docs/service-account.md index 98cdc1dd6..1e091d3e9 100644 --- a/neuro-cli/docs/service-account.md +++ b/neuro-cli/docs/service-account.md @@ -13,68 +13,68 @@ Operations with service accounts. **Commands:** | Usage | Description | | :--- | :--- | -| [_ls_](service-account.md#ls) | List service accounts | | [_create_](service-account.md#create) | Create a service account | | [_get_](service-account.md#get) | Get service account SERVICE\_ACCOUNT | +| [_ls_](service-account.md#ls) | List service accounts | | [_rm_](service-account.md#rm) | Remove service accounts SERVICE\_ACCOUNT | -### ls +### create -List service accounts +Create a service account #### Usage ```bash -neuro service-account ls [OPTIONS] +neuro service-account create [OPTIONS] ``` -List service accounts. +Create a service account. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--default-cluster CLUSTER\_NAME_ | Service account default cluster. Current cluster will be used if not specified | +| _--name NAME_ | Optional service account name | -### create +### get -Create a service account +Get service account SERVICE_ACCOUNT #### Usage ```bash -neuro service-account create [OPTIONS] +neuro service-account get [OPTIONS] SERVICE_ACCOUNT ``` -Create a service account. +Get service account `SERVICE`_`ACCOUNT`. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--default-cluster CLUSTER\_NAME_ | Service account default cluster. Current cluster will be used if not specified | -| _--name NAME_ | Optional service account name | -### get +### ls -Get service account SERVICE_ACCOUNT +List service accounts #### Usage ```bash -neuro service-account get [OPTIONS] SERVICE_ACCOUNT +neuro service-account ls [OPTIONS] ``` -Get service account `SERVICE`_`ACCOUNT`. +List service accounts. #### Options diff --git a/neuro-cli/docs/shortcuts.md b/neuro-cli/docs/shortcuts.md index 3a0097641..be68cd872 100644 --- a/neuro-cli/docs/shortcuts.md +++ b/neuro-cli/docs/shortcuts.md @@ -2,163 +2,132 @@ **Commands:** | Usage | Description | | :--- | :--- | -| [_neuro run_](shortcuts.md#run) | Run a job | -| [_neuro ps_](shortcuts.md#ps) | List all jobs | -| [_neuro status_](shortcuts.md#status) | Display status of a job | -| [_neuro exec_](shortcuts.md#exec) | Execute command in a running job | -| [_neuro port-forward_](shortcuts.md#port-forward) | Forward port\(s\) of a job | | [_neuro attach_](shortcuts.md#attach) | Attach terminal to a job | -| [_neuro logs_](shortcuts.md#logs) | Print the logs for a job | +| [_neuro cp_](shortcuts.md#cp) | Copy files and directories | +| [_neuro exec_](shortcuts.md#exec) | Execute command in a running job | +| [_neuro images_](shortcuts.md#images) | List images | | [_neuro kill_](shortcuts.md#kill) | Kill job\(s\) | -| [_neuro top_](shortcuts.md#top) | Display GPU/CPU/Memory usage | -| [_neuro save_](shortcuts.md#save) | Save job's state to an image | | [_neuro login_](shortcuts.md#login) | Log into Neuro Platform | | [_neuro logout_](shortcuts.md#logout) | Log out | -| [_neuro cp_](shortcuts.md#cp) | Copy files and directories | +| [_neuro logs_](shortcuts.md#logs) | Print the logs for a job | | [_neuro ls_](shortcuts.md#ls) | List directory contents | -| [_neuro rm_](shortcuts.md#rm) | Remove files or directories | | [_neuro mkdir_](shortcuts.md#mkdir) | Make directories | | [_neuro mv_](shortcuts.md#mv) | Move or rename files and directories | -| [_neuro images_](shortcuts.md#images) | List images | -| [_neuro push_](shortcuts.md#push) | Push an image to platform registry | +| [_neuro port-forward_](shortcuts.md#port-forward) | Forward port\(s\) of a job | +| [_neuro ps_](shortcuts.md#ps) | List all jobs | | [_neuro pull_](shortcuts.md#pull) | Pull an image from platform registry | +| [_neuro push_](shortcuts.md#push) | Push an image to platform registry | +| [_neuro rm_](shortcuts.md#rm) | Remove files or directories | +| [_neuro run_](shortcuts.md#run) | Run a job | +| [_neuro save_](shortcuts.md#save) | Save job's state to an image | | [_neuro share_](shortcuts.md#share) | Shares resource with another user | +| [_neuro status_](shortcuts.md#status) | Display status of a job | +| [_neuro top_](shortcuts.md#top) | Display GPU/CPU/Memory usage | -### run +### attach -Run a job +Attach terminal to a job #### Usage ```bash -neuro run [OPTIONS] IMAGE [-- CMD...] +neuro attach [OPTIONS] JOB ``` -Run a job - -`IMAGE` docker image name to run in a job. - -`CMD` list will be -passed as arguments to the executed job's image. - -#### Examples - -```bash - -# Starts a container pytorch:latest on a machine with smaller GPU resources -# (see exact values in `neuro config show`) and with two volumes mounted: -# storage:/ --> /var/storage/home (in read-write mode), -# storage:/neuromation/public --> /var/storage/neuromation (in read-only mode). -$ neuro run --preset=gpu-small --volume=storage::/var/storage/home:rw \ -$ --volume=storage:/neuromation/public:/var/storage/home:ro pytorch:latest +Attach terminal to a job -# Starts a container using the custom image my-ubuntu:latest stored in neuro -# registry, run /script.sh and pass arg1 and arg2 as its arguments: -$ neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 arg2 -``` +Attach local standard input, output, and error +streams to a running job. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--browse_ | Open a job's URL in a web browser | -| _--cluster CLUSTER_ | Run job in a specified cluster | -| _-d, --description DESC_ | Optional job description in free format | -| _--detach_ | Don't attach to job logs and don't wait for exit code | -| _--entrypoint TEXT_ | Executable entrypoint in the container \(note that it overwrites `ENTRYPOINT` and `CMD` instructions of the docker image\) | -| _-e, --env VAR=VAL_ | Set environment variable in container. Use multiple options to define more than one variable. See `neuro help secrets` for information about passing secrets as environment variables. | -| _--env-file PATH_ | File with environment variables to pass | -| _-x, --extshm / -X, --no-extshm_ | Request extended '/dev/shm' space _\[default: x\]_ | -| _--http PORT_ | Enable HTTP port forwarding to container _\[default: 80\]_ | -| _--http-auth / --no-http-auth_ | Enable HTTP authentication for forwarded HTTP port _\[default: True\]_ | -| _--life-span TIMEDELTA_ | Optional job run-time limit in the format '1d2h3m4s' \(some parts may be missing\). Set '0' to disable. Default value '1d' can be changed in the user config. | -| _-n, --name NAME_ | Optional job name | -| _--org ORG_ | Run job in a specified org | -| _--pass-config / --no-pass-config_ | Upload neuro config to the job _\[default: no-pass-config\]_ | | _--port-forward LOCAL\_PORT:REMOTE\_RORT_ | Forward port\(s\) of a running job to local port\(s\) \(use multiple times for forwarding several ports\) | -| _-s, --preset PRESET_ | Predefined resource configuration \(to see available values, run `neuro config show`\) | -| _--privileged_ | Run job in privileged mode, if it is supported by cluster. _\[default: False\]_ | -| _--restart \[never | on-failure | always\]_ | Restart policy to apply when a job exits _\[default: never\]_ | -| _--schedule-timeout TIMEDELTA_ | Optional job schedule timeout in the format '3m4s' \(some parts may be missing\). | -| _--share USER_ | Share job write permissions to user or role. | -| _--tag TAG_ | Optional job tag, multiple values allowed | -| _-t, --tty / -T, --no-tty_ | Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script. | -| _-v, --volume MOUNT_ | Mounts directory from vault into container. Use multiple options to mount more than one volume. See `neuro help secrets` for information about passing secrets as mounted files. | -| _--wait-for-seat / --no-wait-for-seat_ | Wait for total running jobs quota _\[default: no-wait-for-seat\]_ | -| _--wait-start / --no-wait-start_ | Wait for a job start or failure _\[default: wait-start\]_ | -| _-w, --workdir TEXT_ | Working directory inside the container | -### ps +### cp -List all jobs +Copy files and directories #### Usage ```bash -neuro ps [OPTIONS] +neuro cp [OPTIONS] [SOURCES]... [DESTINATION] ``` -List all jobs. - -#### Examples +Copy files and directories. -```bash +Either `SOURCES` or `DESTINATION` should have +storage:// scheme. +If scheme is omitted, file:// scheme is assumed. -$ neuro ps -a -$ neuro ps -a --owner=user-1 --owner=user-2 -$ neuro ps --name my-experiments-v1 -s failed -s succeeded -$ neuro ps --description=my favourite job -$ neuro ps -s failed -s succeeded -q -$ neuro ps -t tag1 -t tag2 -``` +Use +/dev/stdin and /dev/stdout file names to copy a file from terminal +and print +the content of file on the storage to console. -#### Options +Any number of --exclude and +--include options can be passed. The +filters that appear later in the command +take precedence over filters +that appear earlier in the command. If neither +--exclude nor +--include options are specified the default can be changed using +the +storage.cp-exclude configuration variable documented in +"neuro help user- +config". -| Name | Description | -| :--- | :--- | -| _--help_ | Show this message and exit. | -| _-a, --all_ | Show all jobs regardless the status. | -| _--cluster CLUSTER_ | Show jobs on a specified cluster \(the current cluster by default\). | -| _-d, --description DESCRIPTION_ | Filter out jobs by description \(exact match\). | -| _--distinct_ | Show only first job if names are same. | -| _--format COLUMNS_ | Output table format, see "neuro help ps-format" for more info about the format specification. The default can be changed using the job.ps-format configuration variable documented in "neuro help user-config" | -| _--full-uri_ | Output full image URI. | -| _-n, --name NAME_ | Filter out jobs by name. | -| _-o, --owner TEXT_ | Filter out jobs by owner \(multiple option\). Supports `ME` option to filter by the current user. | -| _--recent-first / --recent-last_ | Show newer jobs first or last | -| _--since DATE\_OR\_TIMEDELTA_ | Show jobs created after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | -| _-s, --status \[pending | suspended | running | succeeded | failed | cancelled\]_ | Filter out jobs by status \(multiple option\). | -| _-t, --tag TAG_ | Filter out jobs by tag \(multiple option\) | -| _--until DATE\_OR\_TIMEDELTA_ | Show jobs created before a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | -| _-w, --wide_ | Do not cut long lines for terminal width. | +#### Examples +```bash +# copy local files into remote storage root +$ neuro cp foo.txt bar/baz.dat storage: +$ neuro cp foo.txt bar/baz.dat -t storage: -### status +# copy local directory `foo` into existing remote directory `bar` +$ neuro cp -r foo -t storage:bar -Display status of a job +# copy the content of local directory `foo` into existing remote +# directory `bar` +$ neuro cp -r -T storage:foo storage:bar +# download remote file `foo.txt` into local file `/tmp/foo.txt` with +# explicit file:// scheme set +$ neuro cp storage:foo.txt file:///tmp/foo.txt +$ neuro cp -T storage:foo.txt file:///tmp/foo.txt +$ neuro cp storage:foo.txt file:///tmp +$ neuro cp storage:foo.txt -t file:///tmp -#### Usage +# download other user's remote file into the current directory +$ neuro cp storage://{username}/foo.txt . -```bash -neuro status [OPTIONS] JOB +# download only files with extension `.out` into the current directory +$ neuro cp storage:results/*.out . ``` -Display status of a job. - #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--full-uri_ | Output full URI. | +| _--continue_ | Continue copying partially-copied files. | +| _--exclude-from-files FILES_ | A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp-exclude-from-files configuration variable documented in "neuro help user-config" | +| _--exclude_ | Exclude files and directories that match the specified pattern. | +| _--include_ | Don't exclude files and directories that match the specified pattern. | +| _--glob / --no-glob_ | Expand glob patterns in SOURCES with explicit scheme. _\[default: glob\]_ | +| _-T, --no-target-directory_ | Treat DESTINATION as a normal file. | +| _-p, --progress / -P, --no-progress_ | Show progress, on by default in TTY mode, off otherwise. | +| _-r, --recursive_ | Recursive copy, off by default | +| _-t, --target-directory DIRECTORY_ | Copy all SOURCES into DIRECTORY. | +| _-u, --update_ | Copy only when the SOURCE file is newer than the destination file or when the destination file is missing. | @@ -195,39 +164,45 @@ $ neuro exec --no-tty my-job -- ls -l -### port-forward +### images -Forward port(s) of a job +List images #### Usage ```bash -neuro port-forward [OPTIONS] JOB LOCAL_PORT:REMOTE_RORT... +neuro images [OPTIONS] ``` -Forward port(s) of a job. +List images. -Forwards port(s) of a running job to local port(s). +#### Options -#### Examples +| Name | Description | +| :--- | :--- | +| _--help_ | Show this message and exit. | +| _--cluster CLUSTER_ | Show images on a specified cluster \(the current cluster by default\). | +| _-l_ | List in long format. | +| _--full-uri_ | Output full image URI. | +| _-n, --name PATTERN_ | Filter out images by name regex. | +| _-o, --owner TEXT_ | Filter out images by owner \(multiple option\). Supports `ME` option to filter by the current user. | -```bash -# Forward local port 2080 to port 80 of job's container. -# You can use http://localhost:2080 in browser to access job's served http -$ neuro job port-forward my-fastai-job 2080:80 -# Forward local port 2222 to job's port 22 -# Then copy all data from container's folder '/data' to current folder -# (please run second command in other terminal) -$ neuro job port-forward my-job-with-ssh-server 2222:22 -$ rsync -avxzhe ssh -p 2222 root@localhost:/data . +### kill -# Forward few ports at once -$ neuro job port-forward my-job 2080:80 2222:22 2000:100 +Kill job(s) + + +#### Usage + +```bash +neuro kill [OPTIONS] JOBS... ``` +Kill job(s). + #### Options | Name | Description | @@ -236,137 +211,164 @@ $ neuro job port-forward my-job 2080:80 2222:22 2000:100 -### attach +### login -Attach terminal to a job +Log into Neuro Platform #### Usage ```bash -neuro attach [OPTIONS] JOB +neuro login [OPTIONS] [URL] ``` -Attach terminal to a job +Log into Neuro Platform. -Attach local standard input, output, and error -streams to a running job. +`URL` is a platform entrypoint `URL`. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--port-forward LOCAL\_PORT:REMOTE\_RORT_ | Forward port\(s\) of a running job to local port\(s\) \(use multiple times for forwarding several ports\) | -### logs +### logout -Print the logs for a job +Log out #### Usage ```bash -neuro logs [OPTIONS] JOB +neuro logout [OPTIONS] ``` -Print the logs for a job. +Log out. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--since DATE\_OR\_TIMEDELTA_ | Only return logs after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | -| _--timestamps_ | Include timestamps on each line in the log output. | -### kill +### logs -Kill job(s) +Print the logs for a job #### Usage ```bash -neuro kill [OPTIONS] JOBS... +neuro logs [OPTIONS] JOB ``` -Kill job(s). +Print the logs for a job. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--since DATE\_OR\_TIMEDELTA_ | Only return logs after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | +| _--timestamps_ | Include timestamps on each line in the log output. | -### top +### ls -Display GPU/CPU/Memory usage +List directory contents #### Usage ```bash -neuro top [OPTIONS] [JOBS]... +neuro ls [OPTIONS] [PATHS]... ``` -Display `GPU`/`CPU`/Memory usage. +List directory contents. -#### Examples +By default `PATH` is equal user's home dir +(storage:) -```bash +#### Options -$ neuro top -$ neuro top job-1 job-2 -$ neuro top --owner=user-1 --owner=user-2 -$ neuro top --name my-experiments-v1 -$ neuro top -t tag1 -t tag2 +| Name | Description | +| :--- | :--- | +| _--help_ | Show this message and exit. | +| _-d, --directory_ | list directories themselves, not their contents. | +| _-l_ | use a long listing format. | +| _-h, --human-readable_ | with -l print human readable sizes \(e.g., 2K, 540M\). | +| _-a, --all_ | do not ignore entries starting with . | +| _--sort \[name | size | time\]_ | sort by given field, default is name. | + + + +### mkdir + +Make directories + + +#### Usage + +```bash +neuro mkdir [OPTIONS] PATHS... ``` +Make directories. + #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Show jobs on a specified cluster \(the current cluster by default\). | -| _-d, --description DESCRIPTION_ | Filter out jobs by description \(exact match\). | -| _--format COLUMNS_ | Output table format, see "neuro help top-format" for more info about the format specification. The default can be changed using the job.top-format configuration variable documented in "neuro help user-config" | -| _--full-uri_ | Output full image URI. | -| _-n, --name NAME_ | Filter out jobs by name. | -| _-o, --owner TEXT_ | Filter out jobs by owner \(multiple option\). Supports `ME` option to filter by the current user. Specify `ALL` to show jobs of all users. | -| _--since DATE\_OR\_TIMEDELTA_ | Show jobs created after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | -| _--sort COLUMNS_ | Sort rows by specified column. Add "-" prefix to revert the sorting order. Multiple columns can be specified \(comma separated\). _\[default: cpu\]_ | -| _-t, --tag TAG_ | Filter out jobs by tag \(multiple option\) | -| _--timeout FLOAT_ | Maximum allowed time for executing the command, 0 for no timeout _\[default: 0\]_ | -| _--until DATE\_OR\_TIMEDELTA_ | Show jobs created before a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | +| _-p, --parents_ | No error if existing, make parent directories as needed | -### save +### mv -Save job's state to an image +Move or rename files and directories #### Usage ```bash -neuro save [OPTIONS] JOB IMAGE +neuro mv [OPTIONS] [SOURCES]... [DESTINATION] ``` -Save job's state to an image. +Move or rename files and directories. + +`SOURCE` must contain path to the +file +or directory existing on the storage, and `DESTINATION` must contain +the full +path to the target file or directory. #### Examples ```bash -$ neuro job save job-id image:ubuntu-patched -$ neuro job save my-favourite-job image:ubuntu-patched:v1 -$ neuro job save my-favourite-job image://bob/ubuntu-patched + +# move and rename remote file +$ neuro mv storage:foo.txt storage:bar/baz.dat +$ neuro mv -T storage:foo.txt storage:bar/baz.dat + +# move remote files into existing remote directory +$ neuro mv storage:foo.txt storage:bar/baz.dat storage:dst +$ neuro mv storage:foo.txt storage:bar/baz.dat -t storage:dst + +# move the content of remote directory into other existing +# remote directory +$ neuro mv -T storage:foo storage:bar + +# move remote file into other user's directory +$ neuro mv storage:foo.txt storage://{username}/bar.dat + +# move remote file from other user's directory +$ neuro mv storage://{username}/foo.txt storage:bar.dat ``` #### Options @@ -374,23 +376,44 @@ $ neuro job save my-favourite-job image://bob/ubuntu-patched | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--glob / --no-glob_ | Expand glob patterns in SOURCES _\[default: glob\]_ | +| _-T, --no-target-directory_ | Treat DESTINATION as a normal file | +| _-t, --target-directory DIRECTORY_ | Copy all SOURCES into DIRECTORY | -### login +### port-forward -Log into Neuro Platform +Forward port(s) of a job #### Usage ```bash -neuro login [OPTIONS] [URL] +neuro port-forward [OPTIONS] JOB LOCAL_PORT:REMOTE_RORT... ``` -Log into Neuro Platform. +Forward port(s) of a job. -`URL` is a platform entrypoint `URL`. +Forwards port(s) of a running job to local port(s). + +#### Examples + +```bash + +# Forward local port 2080 to port 80 of job's container. +# You can use http://localhost:2080 in browser to access job's served http +$ neuro job port-forward my-fastai-job 2080:80 + +# Forward local port 2222 to job's port 22 +# Then copy all data from container's folder '/data' to current folder +# (please run second command in other terminal) +$ neuro job port-forward my-job-with-ssh-server 2222:22 +$ rsync -avxzhe ssh -p 2222 root@localhost:/data . + +# Forward few ports at once +$ neuro job port-forward my-job 2080:80 2222:22 2000:100 +``` #### Options @@ -400,88 +423,77 @@ Log into Neuro Platform. -### logout +### ps -Log out +List all jobs #### Usage ```bash -neuro logout [OPTIONS] +neuro ps [OPTIONS] ``` -Log out. +List all jobs. + +#### Examples + +```bash + +$ neuro ps -a +$ neuro ps -a --owner=user-1 --owner=user-2 +$ neuro ps --name my-experiments-v1 -s failed -s succeeded +$ neuro ps --description=my favourite job +$ neuro ps -s failed -s succeeded -q +$ neuro ps -t tag1 -t tag2 +``` #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _-a, --all_ | Show all jobs regardless the status. | +| _--cluster CLUSTER_ | Show jobs on a specified cluster \(the current cluster by default\). | +| _-d, --description DESCRIPTION_ | Filter out jobs by description \(exact match\). | +| _--distinct_ | Show only first job if names are same. | +| _--format COLUMNS_ | Output table format, see "neuro help ps-format" for more info about the format specification. The default can be changed using the job.ps-format configuration variable documented in "neuro help user-config" | +| _--full-uri_ | Output full image URI. | +| _-n, --name NAME_ | Filter out jobs by name. | +| _-o, --owner TEXT_ | Filter out jobs by owner \(multiple option\). Supports `ME` option to filter by the current user. | +| _--recent-first / --recent-last_ | Show newer jobs first or last | +| _--since DATE\_OR\_TIMEDELTA_ | Show jobs created after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | +| _-s, --status \[pending | suspended | running | succeeded | failed | cancelled\]_ | Filter out jobs by status \(multiple option\). | +| _-t, --tag TAG_ | Filter out jobs by tag \(multiple option\) | +| _--until DATE\_OR\_TIMEDELTA_ | Show jobs created before a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | +| _-w, --wide_ | Do not cut long lines for terminal width. | -### cp +### pull -Copy files and directories +Pull an image from platform registry #### Usage ```bash -neuro cp [OPTIONS] [SOURCES]... [DESTINATION] +neuro pull [OPTIONS] REMOTE_IMAGE [LOCAL_IMAGE] ``` -Copy files and directories. - -Either `SOURCES` or `DESTINATION` should have -storage:// scheme. -If scheme is omitted, file:// scheme is assumed. - -Use -/dev/stdin and /dev/stdout file names to copy a file from terminal -and print -the content of file on the storage to console. +Pull an image from platform registry. -Any number of --exclude and ---include options can be passed. The -filters that appear later in the command -take precedence over filters -that appear earlier in the command. If neither ---exclude nor ---include options are specified the default can be changed using -the -storage.cp-exclude configuration variable documented in -"neuro help user- -config". +Remote image name must be `URL` with +image:// scheme. +Image names can contain tag. #### Examples ```bash -# copy local files into remote storage root -$ neuro cp foo.txt bar/baz.dat storage: -$ neuro cp foo.txt bar/baz.dat -t storage: - -# copy local directory `foo` into existing remote directory `bar` -$ neuro cp -r foo -t storage:bar - -# copy the content of local directory `foo` into existing remote -# directory `bar` -$ neuro cp -r -T storage:foo storage:bar - -# download remote file `foo.txt` into local file `/tmp/foo.txt` with -# explicit file:// scheme set -$ neuro cp storage:foo.txt file:///tmp/foo.txt -$ neuro cp -T storage:foo.txt file:///tmp/foo.txt -$ neuro cp storage:foo.txt file:///tmp -$ neuro cp storage:foo.txt -t file:///tmp - -# download other user's remote file into the current directory -$ neuro cp storage://{username}/foo.txt . - -# download only files with extension `.out` into the current directory -$ neuro cp storage:results/*.out . +$ neuro pull image:myimage +$ neuro pull image://myfriend/alpine:shared +$ neuro pull image://username/my-alpine:production alpine:from-registry ``` #### Options @@ -489,45 +501,42 @@ $ neuro cp storage:results/*.out . | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--continue_ | Continue copying partially-copied files. | -| _--exclude-from-files FILES_ | A list of file names that contain patterns for exclusion files and directories. Used only for uploading. The default can be changed using the storage.cp-exclude-from-files configuration variable documented in "neuro help user-config" | -| _--exclude_ | Exclude files and directories that match the specified pattern. | -| _--include_ | Don't exclude files and directories that match the specified pattern. | -| _--glob / --no-glob_ | Expand glob patterns in SOURCES with explicit scheme. _\[default: glob\]_ | -| _-T, --no-target-directory_ | Treat DESTINATION as a normal file. | -| _-p, --progress / -P, --no-progress_ | Show progress, on by default in TTY mode, off otherwise. | -| _-r, --recursive_ | Recursive copy, off by default | -| _-t, --target-directory DIRECTORY_ | Copy all SOURCES into DIRECTORY. | -| _-u, --update_ | Copy only when the SOURCE file is newer than the destination file or when the destination file is missing. | -### ls +### push -List directory contents +Push an image to platform registry #### Usage ```bash -neuro ls [OPTIONS] [PATHS]... +neuro push [OPTIONS] LOCAL_IMAGE [REMOTE_IMAGE] ``` -List directory contents. +Push an image to platform registry. -By default `PATH` is equal user's home dir -(storage:) +Remote image must be `URL` with image:// +scheme. +Image names can contain tag. If tags not specified 'latest' will +be +used as value. + +#### Examples + +```bash + +$ neuro push myimage +$ neuro push alpine:latest image:my-alpine:production +$ neuro push alpine image://myfriend/alpine:shared +``` #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-d, --directory_ | list directories themselves, not their contents. | -| _-l_ | use a long listing format. | -| _-h, --human-readable_ | with -l print human readable sizes \(e.g., 2K, 540M\). | -| _-a, --all_ | do not ignore entries starting with . | -| _--sort \[name | size | time\]_ | sort by given field, default is name. | @@ -565,68 +574,38 @@ $ neuro rm storage:foo/**/*.tmp -### mkdir +### run -Make directories +Run a job #### Usage ```bash -neuro mkdir [OPTIONS] PATHS... +neuro run [OPTIONS] IMAGE [-- CMD...] ``` -Make directories. - -#### Options - -| Name | Description | -| :--- | :--- | -| _--help_ | Show this message and exit. | -| _-p, --parents_ | No error if existing, make parent directories as needed | - - - -### mv - -Move or rename files and directories - - -#### Usage - -```bash -neuro mv [OPTIONS] [SOURCES]... [DESTINATION] -``` +Run a job -Move or rename files and directories. +`IMAGE` docker image name to run in a job. -`SOURCE` must contain path to the -file -or directory existing on the storage, and `DESTINATION` must contain -the full -path to the target file or directory. +`CMD` list will be +passed as arguments to the executed job's image. #### Examples ```bash -# move and rename remote file -$ neuro mv storage:foo.txt storage:bar/baz.dat -$ neuro mv -T storage:foo.txt storage:bar/baz.dat - -# move remote files into existing remote directory -$ neuro mv storage:foo.txt storage:bar/baz.dat storage:dst -$ neuro mv storage:foo.txt storage:bar/baz.dat -t storage:dst - -# move the content of remote directory into other existing -# remote directory -$ neuro mv -T storage:foo storage:bar - -# move remote file into other user's directory -$ neuro mv storage:foo.txt storage://{username}/bar.dat +# Starts a container pytorch:latest on a machine with smaller GPU resources +# (see exact values in `neuro config show`) and with two volumes mounted: +# storage:/ --> /var/storage/home (in read-write mode), +# storage:/neuromation/public --> /var/storage/neuromation (in read-only mode). +$ neuro run --preset=gpu-small --volume=storage::/var/storage/home:rw \ +$ --volume=storage:/neuromation/public:/var/storage/home:ro pytorch:latest -# move remote file from other user's directory -$ neuro mv storage://{username}/foo.txt storage:bar.dat +# Starts a container using the custom image my-ubuntu:latest stored in neuro +# registry, run /script.sh and pass arg1 and arg2 as its arguments: +$ neuro run -s cpu-small --entrypoint=/script.sh image:my-ubuntu:latest -- arg1 arg2 ``` #### Options @@ -634,64 +613,91 @@ $ neuro mv storage://{username}/foo.txt storage:bar.dat | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--glob / --no-glob_ | Expand glob patterns in SOURCES _\[default: glob\]_ | -| _-T, --no-target-directory_ | Treat DESTINATION as a normal file | -| _-t, --target-directory DIRECTORY_ | Copy all SOURCES into DIRECTORY | +| _--browse_ | Open a job's URL in a web browser | +| _--cluster CLUSTER_ | Run job in a specified cluster | +| _-d, --description DESC_ | Optional job description in free format | +| _--detach_ | Don't attach to job logs and don't wait for exit code | +| _--entrypoint TEXT_ | Executable entrypoint in the container \(note that it overwrites `ENTRYPOINT` and `CMD` instructions of the docker image\) | +| _-e, --env VAR=VAL_ | Set environment variable in container. Use multiple options to define more than one variable. See `neuro help secrets` for information about passing secrets as environment variables. | +| _--env-file PATH_ | File with environment variables to pass | +| _-x, --extshm / -X, --no-extshm_ | Request extended '/dev/shm' space _\[default: x\]_ | +| _--http PORT_ | Enable HTTP port forwarding to container _\[default: 80\]_ | +| _--http-auth / --no-http-auth_ | Enable HTTP authentication for forwarded HTTP port _\[default: True\]_ | +| _--life-span TIMEDELTA_ | Optional job run-time limit in the format '1d2h3m4s' \(some parts may be missing\). Set '0' to disable. Default value '1d' can be changed in the user config. | +| _-n, --name NAME_ | Optional job name | +| _--org ORG_ | Run job in a specified org | +| _--pass-config / --no-pass-config_ | Upload neuro config to the job _\[default: no-pass-config\]_ | +| _--port-forward LOCAL\_PORT:REMOTE\_RORT_ | Forward port\(s\) of a running job to local port\(s\) \(use multiple times for forwarding several ports\) | +| _-s, --preset PRESET_ | Predefined resource configuration \(to see available values, run `neuro config show`\) | +| _--privileged_ | Run job in privileged mode, if it is supported by cluster. _\[default: False\]_ | +| _--restart \[never | on-failure | always\]_ | Restart policy to apply when a job exits _\[default: never\]_ | +| _--schedule-timeout TIMEDELTA_ | Optional job schedule timeout in the format '3m4s' \(some parts may be missing\). | +| _--share USER_ | Share job write permissions to user or role. | +| _--tag TAG_ | Optional job tag, multiple values allowed | +| _-t, --tty / -T, --no-tty_ | Allocate a TTY, can be useful for interactive jobs. By default is on if the command is executed from a terminal, non-tty mode is used if executed from a script. | +| _-v, --volume MOUNT_ | Mounts directory from vault into container. Use multiple options to mount more than one volume. See `neuro help secrets` for information about passing secrets as mounted files. | +| _--wait-for-seat / --no-wait-for-seat_ | Wait for total running jobs quota _\[default: no-wait-for-seat\]_ | +| _--wait-start / --no-wait-start_ | Wait for a job start or failure _\[default: wait-start\]_ | +| _-w, --workdir TEXT_ | Working directory inside the container | -### images +### save -List images +Save job's state to an image #### Usage ```bash -neuro images [OPTIONS] +neuro save [OPTIONS] JOB IMAGE ``` -List images. +Save job's state to an image. + +#### Examples + +```bash +$ neuro job save job-id image:ubuntu-patched +$ neuro job save my-favourite-job image:ubuntu-patched:v1 +$ neuro job save my-favourite-job image://bob/ubuntu-patched +``` #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--cluster CLUSTER_ | Show images on a specified cluster \(the current cluster by default\). | -| _-l_ | List in long format. | -| _--full-uri_ | Output full image URI. | -| _-n, --name PATTERN_ | Filter out images by name regex. | -| _-o, --owner TEXT_ | Filter out images by owner \(multiple option\). Supports `ME` option to filter by the current user. | -### push +### share -Push an image to platform registry +Shares resource with another user #### Usage ```bash -neuro push [OPTIONS] LOCAL_IMAGE [REMOTE_IMAGE] +neuro share [OPTIONS] URI USER {read|write|manage} ``` -Push an image to platform registry. +Shares resource with another user. -Remote image must be `URL` with image:// -scheme. -Image names can contain tag. If tags not specified 'latest' will -be -used as value. +`URI` shared resource. + +`USER` username to +share resource with. + +`PERMISSION` sharing access right: read, write, or +manage. #### Examples ```bash - -$ neuro push myimage -$ neuro push alpine:latest image:my-alpine:production -$ neuro push alpine image://myfriend/alpine:shared +$ neuro acl grant storage:///sample_data/ alice manage +$ neuro acl grant image:resnet50 bob read +$ neuro acl grant job:///my_job_id alice write ``` #### Options @@ -702,67 +708,50 @@ $ neuro push alpine image://myfriend/alpine:shared -### pull +### status -Pull an image from platform registry +Display status of a job #### Usage ```bash -neuro pull [OPTIONS] REMOTE_IMAGE [LOCAL_IMAGE] +neuro status [OPTIONS] JOB ``` -Pull an image from platform registry. - -Remote image name must be `URL` with -image:// scheme. -Image names can contain tag. - -#### Examples - -```bash - -$ neuro pull image:myimage -$ neuro pull image://myfriend/alpine:shared -$ neuro pull image://username/my-alpine:production alpine:from-registry -``` +Display status of a job. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--full-uri_ | Output full URI. | -### share +### top -Shares resource with another user +Display GPU/CPU/Memory usage #### Usage ```bash -neuro share [OPTIONS] URI USER {read|write|manage} +neuro top [OPTIONS] [JOBS]... ``` -Shares resource with another user. - -`URI` shared resource. - -`USER` username to -share resource with. - -`PERMISSION` sharing access right: read, write, or -manage. +Display `GPU`/`CPU`/Memory usage. #### Examples ```bash -$ neuro acl grant storage:///sample_data/ alice manage -$ neuro acl grant image:resnet50 bob read -$ neuro acl grant job:///my_job_id alice write + +$ neuro top +$ neuro top job-1 job-2 +$ neuro top --owner=user-1 --owner=user-2 +$ neuro top --name my-experiments-v1 +$ neuro top -t tag1 -t tag2 ``` #### Options @@ -770,5 +759,16 @@ $ neuro acl grant job:///my_job_id alice write | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | +| _--cluster CLUSTER_ | Show jobs on a specified cluster \(the current cluster by default\). | +| _-d, --description DESCRIPTION_ | Filter out jobs by description \(exact match\). | +| _--format COLUMNS_ | Output table format, see "neuro help top-format" for more info about the format specification. The default can be changed using the job.top-format configuration variable documented in "neuro help user-config" | +| _--full-uri_ | Output full image URI. | +| _-n, --name NAME_ | Filter out jobs by name. | +| _-o, --owner TEXT_ | Filter out jobs by owner \(multiple option\). Supports `ME` option to filter by the current user. Specify `ALL` to show jobs of all users. | +| _--since DATE\_OR\_TIMEDELTA_ | Show jobs created after a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | +| _--sort COLUMNS_ | Sort rows by specified column. Add "-" prefix to revert the sorting order. Multiple columns can be specified \(comma separated\). _\[default: cpu\]_ | +| _-t, --tag TAG_ | Filter out jobs by tag \(multiple option\) | +| _--timeout FLOAT_ | Maximum allowed time for executing the command, 0 for no timeout _\[default: 0\]_ | +| _--until DATE\_OR\_TIMEDELTA_ | Show jobs created before a specific date \(including\). Use value of format '1d2h3m4s' to specify moment in past relatively to current time. | diff --git a/neuro-cli/docs/storage.md b/neuro-cli/docs/storage.md index f7802c8db..3f0818a11 100644 --- a/neuro-cli/docs/storage.md +++ b/neuro-cli/docs/storage.md @@ -14,13 +14,13 @@ Storage operations. | Usage | Description | | :--- | :--- | | [_cp_](storage.md#cp) | Copy files and directories | -| [_ls_](storage.md#ls) | List directory contents | +| [_df_](storage.md#df) | Show current usage of storage | | [_glob_](storage.md#glob) | List resources that match PATTERNS | -| [_rm_](storage.md#rm) | Remove files or directories | +| [_ls_](storage.md#ls) | List directory contents | | [_mkdir_](storage.md#mkdir) | Make directories | | [_mv_](storage.md#mv) | Move or rename files and directories | +| [_rm_](storage.md#rm) | Remove files or directories | | [_tree_](storage.md#tree) | List storage in a tree-like format | -| [_df_](storage.md#df) | Show current usage of storage | ### cp @@ -104,32 +104,24 @@ $ neuro cp storage:results/*.out . -### ls +### df -List directory contents +Show current usage of storage #### Usage ```bash -neuro storage ls [OPTIONS] [PATHS]... +neuro storage df [OPTIONS] ``` -List directory contents. - -By default `PATH` is equal user's home dir -(storage:) +Show current usage of storage. #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _-d, --directory_ | list directories themselves, not their contents. | -| _-l_ | use a long listing format. | -| _-h, --human-readable_ | with -l print human readable sizes \(e.g., 2K, 540M\). | -| _-a, --all_ | do not ignore entries starting with . | -| _--sort \[name | size | time\]_ | sort by given field, default is name. | @@ -154,37 +146,32 @@ List resources that match `PATTERNS`. -### rm +### ls -Remove files or directories +List directory contents #### Usage ```bash -neuro storage rm [OPTIONS] PATHS... +neuro storage ls [OPTIONS] [PATHS]... ``` -Remove files or directories. - -#### Examples - -```bash +List directory contents. -$ neuro rm storage:foo/bar -$ neuro rm storage://{username}/foo/bar -$ neuro rm --recursive storage://{username}/foo/ -$ neuro rm storage:foo/**/*.tmp -``` +By default `PATH` is equal user's home dir +(storage:) #### Options | Name | Description | | :--- | :--- | | _--help_ | Show this message and exit. | -| _--glob / --no-glob_ | Expand glob patterns in PATHS _\[default: glob\]_ | -| _-p, --progress / -P, --no-progress_ | Show progress, on by default in TTY mode, off otherwise. | -| _-r, --recursive_ | remove directories and their contents recursively | +| _-d, --directory_ | list directories themselves, not their contents. | +| _-l_ | use a long listing format. | +| _-h, --human-readable_ | with -l print human readable sizes \(e.g., 2K, 540M\). | +| _-a, --all_ | do not ignore entries starting with . | +| _--sort \[name | size | time\]_ | sort by given field, default is name. | @@ -263,6 +250,40 @@ $ neuro mv storage://{username}/foo.txt storage:bar.dat +### rm + +Remove files or directories + + +#### Usage + +```bash +neuro storage rm [OPTIONS] PATHS... +``` + +Remove files or directories. + +#### Examples + +```bash + +$ neuro rm storage:foo/bar +$ neuro rm storage://{username}/foo/bar +$ neuro rm --recursive storage://{username}/foo/ +$ neuro rm storage:foo/**/*.tmp +``` + +#### Options + +| Name | Description | +| :--- | :--- | +| _--help_ | Show this message and exit. | +| _--glob / --no-glob_ | Expand glob patterns in PATHS _\[default: glob\]_ | +| _-p, --progress / -P, --no-progress_ | Show progress, on by default in TTY mode, off otherwise. | +| _-r, --recursive_ | remove directories and their contents recursively | + + + ### tree List storage in a tree-like format @@ -303,24 +324,3 @@ By default `PATH` is equal user's home dir (storage:) | _--sort \[name | size | time\]_ | sort by given field, default is name | - -### df - -Show current usage of storage - - -#### Usage - -```bash -neuro storage df [OPTIONS] -``` - -Show current usage of storage. - -#### Options - -| Name | Description | -| :--- | :--- | -| _--help_ | Show this message and exit. | - - diff --git a/neuro-cli/src/neuro_cli/main.py b/neuro-cli/src/neuro_cli/main.py index 3cd0e1cd3..67df58489 100644 --- a/neuro-cli/src/neuro_cli/main.py +++ b/neuro-cli/src/neuro_cli/main.py @@ -276,7 +276,7 @@ def get_command(self, ctx: click.Context, cmd_name: str) -> Optional[click.Comma def list_commands(self, ctx: click.Context) -> List[str]: self._pre_load() - return list(self.commands) + return sorted(self.commands) def _pre_load(self, name: Optional[str] = None) -> None: if name is None: diff --git a/neuro-cli/src/neuro_cli/topics.py b/neuro-cli/src/neuro_cli/topics.py index de0f17e13..d71ea95e8 100644 --- a/neuro-cli/src/neuro_cli/topics.py +++ b/neuro-cli/src/neuro_cli/topics.py @@ -1,4 +1,4 @@ -from typing import Any, Callable, List, Optional, Type, cast +from typing import Any, Callable, Optional, Type, cast import click from click.utils import make_default_short_help @@ -50,9 +50,6 @@ def decorator(f: Callable[..., Any]) -> Group: return decorator - def list_commands(self, ctx: click.Context) -> List[str]: - return sorted(self.commands) - def group(name: Optional[str] = None, **kwargs: Any) -> Group: kwargs.setdefault("cls", Group) diff --git a/neuro-cli/src/neuro_cli/utils.py b/neuro-cli/src/neuro_cli/utils.py index 38b7ef86e..212afc88b 100644 --- a/neuro-cli/src/neuro_cli/utils.py +++ b/neuro-cli/src/neuro_cli/utils.py @@ -321,9 +321,6 @@ def decorator(f: Callable[..., Any]) -> Group: return decorator - def list_commands(self, ctx: click.Context) -> List[str]: - return list(self.commands) - def invoke(self, ctx: click.Context) -> None: if not ctx.args and not ctx.protected_args: print_help(ctx) diff --git a/neuro-cli/tests/unit/test_click_utils.py b/neuro-cli/tests/unit/test_click_utils.py index 13c19898c..10f6e39f0 100644 --- a/neuro-cli/tests/unit/test_click_utils.py +++ b/neuro-cli/tests/unit/test_click_utils.py @@ -57,8 +57,8 @@ def main() -> None: Usage: main [OPTIONS] COMMAND [ARGS]... Commands: - sub-command Sub-command alias (Deprecated) Alias for sub-command + sub-command Sub-command """ ) diff --git a/neuro-sdk/setup.cfg b/neuro-sdk/setup.cfg index 04ef9fb49..997dda46a 100644 --- a/neuro-sdk/setup.cfg +++ b/neuro-sdk/setup.cfg @@ -49,7 +49,7 @@ install_requires = google-auth>=2.0.2 importlib-metadata>=4.7.1; python_version<"3.10" packaging>=20.4 - neuro-admin-client==21.12.2 + neuro-admin-client==21.12.3 [options.packages.find] where=src diff --git a/neuro-sdk/src/neuro_sdk/_gcs_bucket_provider.py b/neuro-sdk/src/neuro_sdk/_gcs_bucket_provider.py index b576003dc..da36049f5 100644 --- a/neuro-sdk/src/neuro_sdk/_gcs_bucket_provider.py +++ b/neuro-sdk/src/neuro_sdk/_gcs_bucket_provider.py @@ -276,7 +276,7 @@ async def _upload_chunk(*, final: bool = False) -> None: data_range = f"{uploaded_bytes}-{uploaded_bytes+size-1}" async with self._request( "PUT", - url=session_url, + url=str(session_url), data=BytesIO(buffer), headers={"Content-Range": (f"bytes {data_range}/{total}")}, ): diff --git a/neuro-sdk/src/neuro_sdk/_jobs.py b/neuro-sdk/src/neuro_sdk/_jobs.py index 3ddba0342..72a2ce0a9 100644 --- a/neuro-sdk/src/neuro_sdk/_jobs.py +++ b/neuro-sdk/src/neuro_sdk/_jobs.py @@ -119,7 +119,7 @@ def active_items(cls) -> Set["JobStatus"]: def finished_items(cls) -> Set["JobStatus"]: return {item for item in cls.items() if item.is_finished} - __format__ = str.__format__ + __format__ = str.__format__ # type: ignore[assignment] __str__ = str.__str__