Updated on 2023-12-07 GMT+08:00

Deploying as a Real-Time Service

After an AI application is prepared, you can deploy the AI application as a real-time service and predict and call the service.

A maximum of 20 real-time services can be deployed by a user.

Prerequisites

  • Data has been prepared. Specifically, you have created an AI application in the Normal state in ModelArts.

Procedure

  1. Log in to the ModelArts management console. In the left navigation pane, choose Service Deployment > Real-Time Services. By default, the system switches to the Real-Time Services page.
  2. In the real-time service list, click Deploy in the upper left corner. The Deploy page is displayed.
  3. Set parameters for a real-time service.
    1. Set basic information about model deployment. For details about the parameters, see Table 1.
      Table 1 Basic parameters of model deployment

      Parameter

      Description

      Name

      Name of the real-time service. Set this parameter as prompted.

      Description

      Brief description of the real-time service.

    2. Enter key information including the resource pool and AI application configurations. For details, see Table 2.
      Table 2 Parameters

      Parameter

      Sub-Parameter

      Description

      Resource Pool

      Public resource pools

      Instances in the public resource pool can be of the CPU or GPU type.

      Resource Pool

      Dedicated resource pools

      Select a specification from the dedicated resource pool specifications.

      AI Application and Configuration

      AI Application Source

      Select My AI Applications based on your requirements.

      AI Application and Version

      Select the AI application and version that are in the Normal state.

      NOTE:

      After a real-time service is deployed, the AI application and version cannot be changed. To change the AI application version, upgrade the real-time service. For details, see Upgrading a Real-Time Service.

      Streams

      Set the traffic proportion of the current instance node. Service calling requests are allocated to the current version based on this proportion.

      If you deploy only one version of an AI application, set this parameter to 100%. If you select multiple versions for gated launch, ensure that the sum of the traffic ratios of multiple versions is 100%.

      Specifications

      Select available specifications based on the list displayed on the console. The specifications in gray cannot be used in the current environment.

      If specifications in the public resource pools are unavailable, no public resource pool is available in the current environment. In this case, use a dedicated resource pool or contact the administrator to create a public resource pool.

      NOTE:

      When the selected flavor is used to deploy the service, necessary system consumption is generated. Therefore, the resources actually occupied by the service are slightly greater than the selected flavor.

      Compute Nodes

      Set the number of instances for the current AI application version. If you set Instances to 1, the standalone computing mode is used. If you set Instances to a value greater than 1, the distributed computing mode is used. Select a computing mode based on the actual requirements.

      Add AI Application Version and Configuration

      If the selected AI application has multiple versions, you can add multiple versions and configure a traffic ratio. You can use grey launch to smoothly upgrade the AI application version.

      NOTE:

      Free compute specifications do not support the grey launch of multiple versions.

  4. After confirming the entered information, complete service deployment as prompted. Generally, service deployment jobs run for a period of time, which may be several minutes or tens of minutes depending on the amount of your selected data and resources.

    After a real-time service is deployed, it is started immediately.

    You can go to the real-time service list to check whether the deployment of the real-time service is complete. In the real-time service list, after the status of the newly deployed service changes from Deploying to Running, the service is deployed successfully.