Updated on 2024-06-12 GMT+08:00

Logging In to a Training Container Using Cloud Shell

Application Scenarios

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

Constraints

You can use Cloud Shell to log in to a running training container using a dedicated resource pool.

Figure 1 Selecting a dedicated resource pool when creating a training job
Figure 2 A running training job

Preparation: Assigning the Cloud Shell Permission to an IAM User

  1. Log in to the 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 log in to a running training container.
    • Policy View: Select Visual editor.
    • Policy Content: Select Allow, ModelArts Service, modelarts:trainJob:exec, and default resources.
      Figure 3 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 one, add users to it through user group management, and configure authorization for the user group. If the target user is not in a user group, add the user to a user group through user group management.

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. Go to the details page of the target training job and log in to the training container on the Cloud Shell tab.

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

    Figure 4 Cloud Shell