Help Center> ModelArts> Model Development> Performing a Training> Cloud Shell> Logging In to a Training Container Using Cloud Shell
Updated on 2024-05-07 GMT+08:00

Logging In to a Training Container Using Cloud Shell

Application Scenario

You can use Cloud Shell provided by the ModelArts console to log in to a running training container.

Constraints

Only dedicated resource pools support Cloud Shell. The training job must be in the Running state.

Preparation: Assigning the Cloud Shell Permission to an IAM User

  1. Log in to the Huawei Cloud management console as a tenant user, hover the cursor over your username in the upper right corner, and choose Identity and Access Management from the drop-down list to switch to the IAM management console.
  2. On the IAM console, choose Permissions > Policies/Roles from the navigation pane, click Create Custom Policy in the upper right corner, and configure the following parameters.
    • Policy Name: Enter a custom policy name, for example, Using Cloud Shell to access a running job.
    • Policy View: Select Visual editor.
    • Policy Content: Select Allow, ModelArts Service, modelarts:trainJob:exec, and default resources.
      Figure 1 Creating a custom policy
  3. In the navigation pane, choose User Groups. Then, click Authorize in the Operation column of the target user group. On the Authorize User Group page, select the custom policies created in 2, and click Next. Then, select the scope and click OK.

    After the configuration, all users in the user group have the permission to use Cloud Shell to log in to a running training container.

    If no user group is available, create a user group, add users using the user group management function, and configure authorization. If the target user is not in a user group, you can add the user to a user group through the user group management function.

Using Cloud Shell

  1. Configure parameters based on Preparation: Assigning the Cloud Shell Permission to an IAM User.
  2. On the ModelArts console, choose Training Management > Training Jobs from the navigation pane.
  3. In the training job list, click the name of the target job to go to the training job details page.
  4. On the training job details page, click the Cloud Shell tab and log in to the training container.

    Verify that the login is successful, as shown in the following figure.

    Figure 2 Cloud Shell page

    If the job is not running or the permission is insufficient, Cloud Shell cannot be used. In this case, locate the fault as prompted.

    Figure 3 Error message
    A path display exception may occur when you log in to the Cloud Shell page. In this case, press Enter to rectify the fault.
    Figure 4 Abnormal path