Deploying a Model as an Edge Service
After the model is prepared, you can deploy it as an edge service. The Service Deployment > Edge Services page lists all edge services. You can enter a service name in the search box in the upper right corner and click
to query the service. 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 a model 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..
- The account is not in arrears to ensure available resources for service running.
Background
- Currently, edge services are limited-time free. The running edge services are not billed.
- A maximum of 1,000 edge services can be deployed.
Deploying a Model as an Edge Service
- 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.
- In the edge service list, click Deploy in the upper left corner. The Deploy page is displayed.
- Set parameters for an edge service.
- 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.
- Set other parameters, including the resource pool and model configurations. For details, see Table 1.
Table 1 Parameter description Parameter
Description
Model and Configuration
Select the model and version that are in the Normal status.
Specifications
The following specifications are supported:
- CPU: 2 vCPUs | 8 GiB: suitable for models with only CPU loads.
- CPU: 2 vCPUs | 8 GiB GPU: 1 x P4: suitable for models requiring CPU and GPU (NVIDIA P4) resources.
- Custom: If you select Custom, set the following parameters as required: CPU, Memory, GPU, and Ascend Either GPU or Ascend can be set.
Environment Variable
Set environment variables and inject them to the container instance.
Deployment Method
Select Node or Node Group.
- If you create an edge node on IEF, select Node. For details about IEF, see Edge Nodes.
- If you create a platinum instance and an edge node group on IEF, select a 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.
- 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.
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 models 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 and restrictions, see Compressing and Converting Models.
- 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 the 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 a model to Atlas 500, perform the following steps:
- 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.
- In the edge service list, click Deploy in the upper left corner. The Deploy page is displayed.
- On the Deploy page, set the required parameters, and then click Next.
- Set basic information, including Name and Description. The name is generated by default. You are advised to enter a name specific to the service.
- Set edge service parameters. For details, see Table 2.
Table 2 Parameters for deploying a model to Atlas 500 Parameter
Description
Model and Configuration
Select an available model 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.
Specifications
After a model that meets the requirements is selected, it supports the following two types of specifications by default:
- ARM: 3 vCPUs | 3 GiB Ascend: 1 x Ascend 310
- 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 container instance.
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.
Figure 1 Selecting a model and an edge node
- (Optional) Upgrade the C32 firmware of Atlas 500.
- 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.
- 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.
- 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.
- 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.
Last Article: Edge Services
Next Article: Accessing an Edge Service
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.