All Products
Search
Document Center

:Submit jobs by using CLIs

更新時間:Sep 11, 2023

You can use the command-line interface (CLI) to submit Deep Learning Containers (DLC) resource group jobs. This topic describes how to download the DLC client, authenticate user credentials, and create and submit a job.

Prerequisites

Download the DLC client and perform identify authentication

Download the DLC client for your operating system and authenticate your credentials. For more information, see Before you begin.

Create and submit a job

  1. Log on to the Machine Learning Platform for AI (PAI) console.

  2. View the workspace ID on the Workspaces page based on the instructions shown in the following figure.

    image.png
  3. Create a parameter file named ./tfjob.params and copy the following content into the file. Replace the parameters as required. For more information about how to use CLIs in the DLC client, see Supported commands.

    name=test_cli_tfjob_001
    workers=1
    worker_cpu=4
    worker_gpu=0
    worker_memory=4Gi
    worker_shared_memory=4Gi
    worker_image=registry-vpc.cn-beijing.aliyuncs.com/pai-dlc/tensorflow-training:1.12.2PAI-cpu-py27-ubuntu16.04
    command=echo good && sleep 120
    resource_id=<the resource group ID> # If you use the public resource group, this parameter can be left empty. 
    workspace_id=<the workspace ID> 
  4. Use the following code to specify the parameter_file parameter to create and submit a DLC job. The job can be submitted to a specific workspace.

    dlc submit tfjob --job_file  ./tfjob.params
  5. Run the following command to view the job that you submitted:

    dlc get job <jobID>