Download the DLC client and configure authentication to manage data and jobs in PAI.
Usage notes
To resolve certificate errors, run sudo apt-get update && sudo apt-get install ca-certificates.
Download DLC client
Download the DLC client for your operating system:
No installation required. Grant execute permission by running chmod +x dlc.
Auto-completion
-
Feature description
DLC auto-completion works like kubectl and Arena. Type a partial command or argument, then press Tab twice.
-
Syntax
./dlc completion <shelltype> -
Parameter description
<shelltype> specifies the shell type. Valid values: bash, fish, powershell, and zsh.
-
Examples
Enable auto-completion for bash commands:
-
Install the bash-completion package if not already installed, then enable it with the
sourcecommand.# Run the following command to install the bash-completion package in macOS: brew install bash-completion && source /usr/local/etc/bash_completion # Run the following command to install the bash-completion package in Linux: yum install bash-completion && source /etc/profile.d/bash_completion.sh -
Enable auto-completion. This requires the bash-completion package.
source <(./dlc completion bash) -
Run
./dlcand press Tab twice to list available commands../dlcAvailable DLC commands:
completion config create delete get help logs stop submit
NoteFor other shell types, run
dlc completion <zsh | fish | powershell> --help. -
Authentication
-
Feature description
The DLC client requires an Alibaba Cloud AccessKey pair for first-time authentication. Subsequent sessions reuse the saved credentials.
-
Syntax
./dlc config --protocol https --access_id <yourAccessKeyID> --access_key <yourAccessKeySecret> [--endpoint <yourEndpoint>] [--region <yourRegion>] -
Parameter description
Parameter
Required
Description
Type
<yourAccessKeyId>
Yes
AccessKey ID of your Alibaba Cloud account.
STRING
<yourAccessKeySecret>
Yes
AccessKey secret of your Alibaba Cloud account.
STRING
<yourEndpoint>
Yes
Endpoint of the DLC service. Example: pai-dlc.cn-shanghai.aliyuncs.com.
STRING
<yourRegion>
Yes
Region of the DLC service. Example: China (Shanghai) is cn-shanghai.
STRING
-
Examples
Configuration is saved to .dlc/config in the current directory. Example:
./dlc config --protocol https \ --access_id <AccessKeyId> \ --access_key <AccessKeySecret> \ --endpoint 'pai-dlc.cn-shanghai.aliyuncs.com' \ --region cn-shanghaiExpected output:
[OK] Configuration saved to: ~/.dlc/config
What's next
-
After completing authentication, refer to supported commands list for available operations. For more information, see Command list.
-
You can also submit DLC jobs from the PAI console.