NGC CLI
Configuring NGC CLI
The first time you use NGC CLI after installing it, you must set your config. To set your config, run the following command and follow the prompts. You will need your API key, which can be obtained from (https://ngc.nvidia.com).
$ ngc config set
CLI Output Format
The following are examples of the CLI output format - ascii, csv, or json - in response to the ngc user who command.
ascii
+---------+--------------+--------------------+----------------------------+
| User Id | Name | Email | Created Date |
+---------+--------------+--------------------+----------------------------+
| 169 | John Smith | jsmith@example.com | 2017-08-23 04:04:58 UTC +0 |
+---------+--------------+--------------------+----------------------------+
csv
169,John Smith,jsmith@example.com,2017-08-23 04:04:58 UTC +0
json
{
"createdDate": "2017-08-23T04:04:58.000Z",
"email": "jsmith@example.com",
"hasSignedEULA": false,
"id": 169,
"isActive": true,
"isDeleted": false,
"isSAML": true,
"name": "John Smith"
}
Setting Your Configuration
NGC CLI configuration determines which DGX resources you can use to run jobs. It also determines which container registry space within your organization you can access.
When you configured NGC CLI for the first time, you selected the default organization to associate with your user name.If you will be using the resources associated with your organization, then no other action is necessary.
However, to use resources and container registry spaces associated with other organizations, teams, or aces of which you are a member, you must change your configuration accordingly.
Format:
ngc config set [--org org-name] [--team team-name] [--ace ace-name] [--format_type fmt]
The organization name must be specified for all configurations.
Using NGC CLI
To run a NGC CLI command, enter ngc followed by the appropriate options.
Click an item from the side navigation to see a description of that command and all its options.
You can also enter -h at any point to see a list of available options.
Example 1: To view a list of all the available options for ngc, enter
$ ngc -h
usage: ngc [--debug] [--format_type ] [--version] [-h]
{config,diag,registry} ...
NVIDIA NGC CLI
optional arguments:
-h, --help Show this help message and exit.
--debug Enable debug mode.
--format_type Specify the output format type. Supported formats are:
ascii, csv, json. Only commands that produce tabular
data support csv format. Default: ascii
--version Show the CLI version and exit.
ngc:
{config,diag,registry}
config Configuration Commands
diag Diagnostic Commands
registry Registry Commands