Deploying as an Edge Service

After the AI application is prepared, you can deploy it as an edge service. The Service Deployment > Edge Services page lists all edge services. Edge services depend on Intelligent EdgeFabric (IEF). Before deploying an edge service, create an edge node on IEF.

Prerequisites

  • Data has been prepared. Specifically, you have created an AI application in the Normal state in ModelArts.
  • An edge node has been created on IEF. If you have not created an edge node, see Creating an Edge Node. If you have not created an edge node, create one by referring to the Edge Platform User Guide. For details about how to create an edge node, see Edge Nodes..
  • An agency with the Tenant Administrator permission has been created. Edge services depend on edge nodes managed by IEF. To use IEF, an IAM user must be assigned with the Tenant Administrator permission. If a ModelArts agency with the Tenant Administrator permission is not available, edge services fail to be deployed.
    1. Log in to the ModelArts management console. In the left navigation pane, choose Settings. The Global Configuration page is displayed.
    2. Click View Permissions in the Operation column of the target user. In the View Permissions dialog box, ensure that Tenant Administrator is included in the permission list.
      Figure 1 Viewing agency permissions
  • The account is not in arrears to ensure available resources for service running.

Background

  • Edge services are limited-time free. The running edge services are not billed.
  • A maximum of 1,000 edge services can be deployed.

Deploying an Edge Service

  1. Log in to the ModelArts management console. In the left navigation pane, choose Service Deployment > Edge Services. By default, the system switches to the Edge Services page.
  2. In the edge service list, click Deploy in the upper left corner. The Deploy page is displayed.
  3. Set parameters for an edge service.
    1. Set the basic information, including Name and Description. The name is generated by default, for example, service-bc0d. You can specify Name and Description according to actual requirements.
    2. Set other parameters, including the resource pool and AI application configurations. For details, see Table 1.
      Table 1 Parameters

      Parameter

      Description

      Deployment Mode

      Select Node or Node Group.

      • If you have created an edge node on IEF, select Node. For details about IEF, see Edge Node Overview.
      • If you have created a platinum instance and an edge node group on IEF, select Node Group. You need to specify the number of platinum resource instances and the number of instances to be deployed. For details about IEF, see Edge Node Groups.

      Edge Node

      Edge nodes are your edge computing devices used to run edge applications, process your data, and collaborate with cloud applications securely and conveniently.

      Click Add. In the Add Node dialog box that is displayed, select an edge node. Select a created node and click OK.

      Edge Node Group

      Nodes and end devices can be divided into different edge node groups, facilitating deployment of applications on nodes in the groups.

      Click Add. In the Add Node Group dialog box that is displayed, select an edge node group. Select a created node group and click OK.

      AI Application Source

      Select My AI Applications or My Subscriptions based on your requirements.

      AI Application and Version

      Select the model and version that are in the Normal state.

      NOTE:

      After an edge service is deployed, only the version number of the AI application can be changed.

      Specifications

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

      Environment Variable

      Set environment variables and inject them to the pod. To ensure data security, do not enter sensitive information, such as plaintext passwords, in environment variables.

      By default, the external interface protocol is https. You can set the interface protocol to https by modifying the MODELARTS_SSL_ENABLED environment variable.

      MODELARTS_SSL_ENABLED = false
  4. After setting the parameters, deploy the model as an edge service 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.

    You can go to the edge service list to view the basic information about the edge service. In the edge service list, after the status of the newly deployed service changes from Deploying to Running, the service is deployed successfully. In the edge service list, you can view the deployment mode of the edge service.

Deploying a Model as an Edge Service (Atlas 500)

If the device managed by IEF is an Atlas 500 AI edge station, deploy the trained model to the Atlas 500 device. Before performing operations, you need to understand the following requirements:

  • Only OM and TFLite AI applications are supported, that is, the models that can be deployed on Ascend or Arm resources. Models that do not meet the format requirements must be converted to the required formats. For details about model conversion operations and constraints, see Model Conversion.
  • If you use a model trained using a built-in algorithm in AI Gallery and the algorithm applies only to the C32 firmware, you must download and upgrade the firmware when deploying this model to Atlas 500. For details, see Atlas 500 C32 Firmware Upgrade Guide. If the model to be deployed is compatible with the original firmware of Atlas 500, you do not need to upgrade the firmware.
  • You only need to download and upgrade the firmware for Atlas 500.
  • The models must be trained using the built-in algorithms from AI Gallery and supporting Ascend 310 for inference.

To deploy an AI application to Atlas 500, perform the following steps:

  1. Log in to the ModelArts management console. In the left navigation pane, choose Service Deployment > Edge Services. By default, the system switches to the Edge Services page.
  2. In the edge service list, click Deploy in the upper left corner. The Deploy page is displayed.
  3. On the Deploy page, set the required parameters, and then click Create now.
    1. Set the basic information, including Name and Description. The name is generated by default. Enter a name specific to the service.
    2. Set edge service parameters. For details, see Table 2.
      Table 2 Parameters for deploying a model to Atlas 500

      Parameter

      Description

      Deployment Mode

      Node

      Edge Node

      Edge nodes are your edge computing devices used to run edge applications, process your data, and collaborate with cloud applications securely and conveniently.

      Click Add. In the Add Node dialog box that is displayed, select the Atlas 500 node managed in IEF and click OK.

      ModelArts automatically identifies and matches the node. If the firmware of the managed node has not been upgraded to the required version, ModelArts upgrades the C32 firmware as prompted.

      AI Application Source

      Select My AI Applications or My Subscriptions based on your requirements.

      AI Application and Version

      Select an available application and version from the drop-down list.

      NOTE:

      The models are in .om or .tflite format. That is, the models are converted and then imported to ModelArts using the Arm-Ascend template for creating AI applications.

      Specifications

      After an AI application that meets the requirements is selected, it supports the following two types of specifications by default:

      • ARM: Ascend: 1* D310 (8GB) | ARM: 3 vCPUs 3GB
      • Custom: You can set the number of vCPUs, memory size, and Ascend processor count. Atlas 500 has only one Ascend processor. Therefore, if you select the Ascend specifications, set the Ascend processor quantity to 1.

      Environment Variable

      Set environment variables and inject them to the pod. To ensure data security, do not enter sensitive information, such as plaintext passwords, in environment variables.

  4. (Optional) Upgrade the C32 firmware of Atlas 500.
    1. Click Upgrade C32 firmware under the node list. In the dialog box that is displayed, read the upgrade description carefully, select I have read and agree to the above, and click Download to download the firmware version and upgrade guide to the local host. The file name is atlas500_C32_Firmware.zip.
    2. Decompress the atlas500_C32_Firmware.zip file, open the Atlas 500 C32 Firmware Upgrade Guide, and upgrade the Atlas 500 firmware by following the instructions.
    3. After Atlas 500 is upgraded, deploy the edge service again.

      Refresh the ModelArts management console and repeat 1 to 3 to enter the edge service deployment information again. If you select the upgraded Atlas 500, no upgrade prompt is displayed.

  5. After setting the parameters, click Next. The edge service is deployed. 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.

    You can go to the edge service list to view the basic information about the edge service. In the edge service list, after the status of the newly deployed service changes from Deploying to Running, the service is deployed successfully. You can view the deployed applications on Atlas 500.