Deploy a service by using a JSON configuration file

Updated at:

In EAS, you can define and deploy an online service by using a configuration file in JSON format.

View the JSON configuration of a deployed service

If you have already deployed a service in the console (including a service deployed with one click from Model Gallery), you do not need to write a JSON file from scratch. A service deployed from Model Gallery is essentially also an EAS service and uses the same JSON configuration structure as a manual JSON deployment. You can directly view and copy the complete JSON configuration of the deployed service and use it as the starting point for subsequent custom deployments.

To view the JSON configuration of a deployed service, follow these steps:

  1. Go to the EAS console and open the Inference Service tab.

  2. Click the service name of the target service to go to the service details page.

  3. Click the Service Configuration tab. The page displays the complete current JSON configuration of the service, which you can view and copy directly.

You can adjust the copied JSON configuration based on Appendix: JSON parameter descriptions in this topic and then use it in the JSON deployment procedure described in Getting Started.

Note

The parameters used to run the service, such as the runtime image, the entry command (command), and the instance type (machine type), are all included in this JSON configuration and can be viewed directly on the Service Configuration tab. The tab displays the complete configuration without additional hidden fields, so you do not need to obtain them separately through other means. You can switch to a custom deployment based on the exported JSON configuration to manage the service in a fine-grained manner.

Getting Started

1. Prepare a JSON configuration file

The key to deploying a service is to create a JSON file that contains all required configurations. If you are a first-time user, the recommended approach is to configure the parameters through Custom Model Deployment > Custom Deployment. The system automatically generates the corresponding JSON content, which you can then modify and extend.

The following example shows the service.json file. For more parameter descriptions, see Appendix: JSON parameter descriptions.

{
    "metadata": {
        "name": "demo",
        "instance": 1,
        "workspace_id": "your-workspace-id"
    },
    "cloud": {
        "computing": {
            "instances": [
                {
                    "type": "ecs.c7a.large"
                }
            ]
        }
    },
    "containers": [
        {
            "image": "eas-registry-vpc.cn-hangzhou.cr.aliyuncs.com/pai-eas/python-inference:py39-ubuntu2004",
            "script": "python app.py",
            "port": 8000
        }
    ]
}

2. Deploy a service by using a JSON file

  1. Log on to the PAI console. Select a region on the top of the page. Then, select the desired workspace and click Enter Elastic Algorithm Service (EAS).

  2. On the Inference Service tab, click Deploy Service. Then, in the Custom Model Deployment section, select JSON Deployment.

  3. Enter the prepared JSON file and click Deploy. Wait for a period of time. When the service status changes to Running, the service is deployed.

Appendix: JSON parameter descriptions

Parameter

Required

Description

metadata

Yes

The meta information of the service. For more information, see metadata parameter descriptions.

cloud

No

The computing resource and virtual private cloud (VPC) configurations. For more information, see cloud parameter descriptions.

containers

No

The runtime image configurations. For more information, see containers parameter descriptions.

dockerAuth

No

You must configure this parameter when you access a private image repository that requires authentication. The value is the image repository's username:password string, Base64-encoded.

networking

No

The invocation configurations of the service. For more information, see networking parameter descriptions.

storage

No

Used to mount data such as OSS or NAS into the container. For detailed configuration instructions, see Storage mounts.

token

No

The authentication token used to access the service. If you do not specify this parameter, the system automatically generates one.

aimaster

No

Enables Compute monitoring and fault tolerance for multi-node distributed inference services.

model_path

Yes

This parameter is required when you deploy a service by using a processor. model_path and processor_path specify the input data source addresses of the model and the processor respectively. Both parameters support addresses in the following formats:

  • OSS address: The address link can be a specific file path or a folder path.

  • HTTP address: The required file must be a compressed package such as TAR.GZ, TAR, BZ2, or ZIP.

  • Local path: You can use a local path if you use the test command for local debugging.

oss_endpoint

No

The endpoint of OSS, for example, oss-cn-beijing.aliyuncs.com. For other valid values, see Regions and endpoints.

Note

By default, you do not need to specify this parameter. The system uses the internal OSS endpoint of the current region to download the model file or the processor file. You must specify this parameter when you access OSS across regions. For example, if you deploy a service in the Hangzhou region and model_path is set to an OSS address in the Beijing region, you must use this parameter to specify the OSS address for public network access in the Beijing region.

model_entry

No

The entry file of the model, which can contain any file. If you do not specify this parameter, the file name in model_path is used. The path of the main file is passed to the initialize() function in the processor.

model_config

No

The configuration of the model, which supports any text. The value of this parameter is passed as the second argument of the initialize() function in the processor.

processor

No

  • If you use an officially provided built-in processor, you only need to specify the processor code here. For the code that a processor uses in eascmd, see Built-in processors.

  • If you use a custom processor, you do not need to configure this parameter. You only need to configure the processor_path, processor_entry, processor_mainclass, and processor_type parameters.

processor_path

No

The path of the processor package. For more information, see the description of the model_path parameter.

processor_entry

No

The main file of the processor, for example, libprocessor.so or app.py. This file contains the implementations of the initialize() function and the process() function that are required for prediction.

You must specify this parameter when processor_type is set to cpp or python.

processor_mainclass

No

The main file of the processor, which is the mainclass in the JAR package. For example, com.aliyun.TestProcessor.

You must specify this parameter when processor_type is set to java.

processor_type

No

processor: the language in which the processor is implemented. Valid values:

  • cpp

  • java

  • python

warm_up_data_path

No

The path of the request file used for model warm-up. For more information, see Warm up model services.

runtime.enable_crash_block

No

Specifies whether a service instance automatically restarts after it crashes because of an exception in the processor code. Valid values:

  • true: the service instance does not automatically restart, so that the crash scene is preserved for troubleshooting.

  • false: the default value, which indicates that the service instance automatically restarts.

autoscaler

No

The horizontal auto-scaling configuration of the model service. For more information about the field descriptions, see autoscaler parameter descriptions.

labels

No

Configures labels for the EAS service. The format is key:value.

unit.size

No

The number of machines on which a single instance is deployed in a distributed inference configuration. Default value: 2.

sinker

No

Persistently stores the records of all requests and responses of the service in the big data service MaxCompute or in Simple Log Service (SLS). For more information, see sinker parameter descriptions.

confidential

No

By configuring the system trust management service, you can ensure that information such as data, models, and code is securely encrypted during service deployment and invocation, so that a secure and verifiable inference service is implemented. The format is as follows:

Note

The secure encryption environment mainly applies to the storage files that you mount. Mount the storage files before you enable this feature.

"confidential": {
        "trustee_endpoint": "xxxx",
        "decryption_key": "xxxx"
    }

The parameter settings are described as follows. For a more detailed description, see Confidential inference service.

  • trustee_endpoint: the URI of the system trust management service Trustee.

  • decryption_key: the KBS URI of the decryption key. For example, kbs:///default/key/test-key.

metadata parameter descriptions

Common parameters

Parameter

Required

Description

name

Yes

The service name, which must be unique within the same region.

instance

Yes

The number of replicas that are started for the service.

workspace_id

No

The workspace ID. After you configure this parameter, the service can be used only within the specified PAI workspace. For example: 1405**.

cpu

No

The number of CPUs required by each instance.

memory

No

The memory required by each instance. The value is an integer, in MB. For example, "memory": 4096 indicates that each instance requires 4 GB of memory.

gpu

No

The number of GPUs required by each instance.

gpu_core_percentage

No

Used for GPU slicing (this parameter can be configured only when you use an EAS resource group or a resource quota), which allows multiple instances to share a single GPU.

qos

No

The quality of service of the instance. The valid values of this parameter are empty or BestEffort. When qos is set to BestEffort, the CPU sharing mode is enabled. Instances are then scheduled entirely based on GPU memory and memory, and are no longer limited by the number of CPUs on the node. All instances on the node share the CPU. In this case, the cpu field indicates the maximum quota that a single instance can use in the CPU sharing mode.

resource

No

The resource group ID. The configuration policies are as follows:

  • If the service is deployed in a public resource group, you can ignore this parameter. In this case, the service is billed on a pay-as-you-go basis.

  • If the service is deployed in a dedicated resource group, set this parameter to the resource group ID. For example, eas-r-6dbzve8ip0xnzt****.

cuda

No

The CUDA version that the service needs to use. When the service runs, the specified CUDA version is automatically mounted to the /usr/local/cuda directory of the instance.

The currently supported CUDA versions are 8.0, 9.0, 10.0, 10.1, 10.2, 11.0, 11.1, and 11.2. Usage example: "cuda":"11.2".

rdma

No

Specifies whether to enable the RDMA network in a distributed inference configuration. Setting this parameter to 1 enables the RDMA network. If the rdma parameter is not configured, the RDMA network is disabled.

Note

Currently, only services deployed with Lingjun resources can use the RDMA network.

enable_grpc

No

Specifies whether to enable the gRPC connection of the service gateway. Valid values:

  • false: the default value, which indicates that the gateway does not enable the gRPC connection. HTTP requests are supported by default.

  • true: indicates that the gateway enables the gRPC connection.

Note

If you deploy a service by using a custom runtime image and the server in the runtime image is implemented with gRPC, you must use this parameter to switch the protocol of the gateway to gRPC.

enable_webservice

No

Specifies whether to enable the webserver, so that the service is deployed as an AI-Web application:

  • false: the default value, which indicates that the webserver is not enabled.

  • true: indicates that the webserver is enabled.

type

No

Set this parameter to LLMGatewayService to deploy an LLM intelligent router service. For more information, see LLM intelligent router deployment.

Advanced parameters

Important

Adjust the advanced parameters with caution.

Parameter

Required

Description

rpc

batching

No

Specifies whether to enable server-side batching, which is used for GPU model acceleration and is supported only in built-in processor mode. Valid values:

  • false: the default value, which disables server-side batching.

  • true: enables server-side batching.

keepalive

No

Sets the maximum processing time for a single request (unit: milliseconds). If the request processing time exceeds this value, the server returns a 408 timeout and closes the connection. Default value: 600000 for a dedicated gateway. Application Load Balancer (ALB) dedicated gateways do not support this configuration.

io_threads

No

The number of threads used by each instance to process network I/O. Default value: 4.

max_batch_size

No

The maximum size of each batch. Default value: 16. This parameter is supported only in built-in processor mode. The parameter takes effect only when rpc.batching is set to true.

max_batch_timeout

No

The maximum timeout of each batch. Default value: 50 milliseconds. This parameter is supported only in built-in processor mode. The parameter takes effect only when rpc.batching is set to true.

max_queue_size

No

The maximum length of the queue when you create an asynchronous inference service. Default value: 64. When the queue is full, the server returns 450 and closes the connection. To ensure that the server is not overloaded, the queue can notify the client in advance to retry on other instances. For service queues with a long RT, you can appropriately reduce the queue length to avoid requests piling up in the queue and causing a large number of requests to time out.

worker_threads

No

The number of threads used for concurrent request processing in each instance. Default value: 5. This parameter is supported only in built-in processor mode.

rate_limit

No

Enables the QPS throttling feature and limits the maximum QPS that an instance can process. Default value: 0, which indicates that the QPS throttling feature is disabled.

For example, if this parameter is set to 2000, requests are rejected and 429 (Too Many Requests) is returned when the QPS exceeds 2000.

enable_sigterm

No

Valid values:

  • false (default): no SIGTERM signal is sent when the instance enters the exiting state.

  • true: when a service instance enters the exiting state, the system immediately sends a SIGTERM signal to the main process. After the processes in the service receive this signal, they must perform custom graceful exit operations in the signal handler function. If this signal is not handled, the main process may exit directly after receiving the signal, which causes the graceful exit to fail.

rolling_strategy

max_surge

No

The maximum number of extra instances that can be created beyond the specified number of replicas during a rolling update of the service. This parameter can be a positive integer, which indicates the number of instances, or a percentage, such as 2%. The default percentage is 2%. Increasing this parameter can speed up service updates.

For example, if the number of service instances is set to 100 and this parameter is set to 20, 20 new instances are created immediately after the service update starts.

max_unavailable

No

The maximum number of unavailable instances during a rolling update of the service. This parameter releases resources for new instances during a service update, so that the update is not stuck because of insufficient idle resources. Currently, the default value of this parameter is 1 in a dedicated resource group and 0 in a public resource group.

For example, if this parameter is set to N, N instances are immediately stopped when the service update starts.

Note

If idle resources are sufficient, you can set this parameter to 0. Setting this parameter too large may affect service stability, because at the moment of the service update, the number of available instances decreases and the traffic carried by a single instance increases. You need to balance service stability and resource conditions when you set this parameter.

eas.termination_grace_period

No

The graceful exit time of the instance, in seconds. Default value: 30 seconds.

EAS services use a rolling update strategy. An instance first enters the Terminating state, and the service first switches traffic away from the instance that is about to exit. The instance waits for 30 seconds, finishes processing the requests it has already received, and then exits. If request processing takes a long time, you can appropriately increase the value of this parameter to ensure that all requests in the in progress state are processed when the service is updated.

Important

Setting this parameter too small affects service stability, and setting this parameter too large causes the service update to be too slow. Do not configure this parameter unless you have special requirements.

scheduling

spread.policy

No

The spread policy used when service instances are scheduled. The following policies are supported:

  • host: instances are spread by node, so that instances are distributed across different nodes as much as possible.

  • zone: instances are spread by the zone in which the node resides, so that instances are distributed across different zones as much as possible.

  • default: instances are scheduled based on the default policy, with no active spreading logic.

Configuration example:

{
  "metadata": {
    "scheduling": {
      "spread": {
        "policy": "host"
      }
    }
}

resource_rebalancing

No

Valid values:

  • false (default): this feature is not enabled.

  • true: EAS periodically creates probe instances on high-priority resources. If a probe instance is scheduled successfully, more probe instances are created in an exponentially increasing manner until scheduling fails. In addition, after a successfully scheduled probe instance completes initialization and enters the ready state, it replaces an instance on low-priority resources.

This feature can solve the following problems:

  • During a rolling update of the service, instances that are being terminated still occupy resources, which causes newly created instances to start in the public resource group. Because of public resource limits, subsequent new instances are rescheduled back to the dedicated resource group.

  • When preemptible instances and regular instances are used at the same time, the system periodically checks whether preemptible instances are available. If they are available, regular instances are migrated to preemptible instances.

resource_burstable

No

You can enable the Elastic resource pool feature for EAS services deployed in a dedicated resource group:

  • true: indicates that the feature is enabled.

  • false: indicates that the feature is disabled.

shm_size

No

Configures the shared memory of the instance, so that memory is read and written directly without copying or transferring data. Unit: GB.

cloud parameter descriptions

Parameter

Required

Description

computing

instances

No

When you deploy a service by using a public resource group, you must set this parameter, which indicates the list of resource specifications to use. When bidding for an instance type fails or the instance type is out of stock, the next instance type in the configured order is used to create the service.

  • type: the resource specification

  • spot_price_limit is an optional parameter:

    • When this parameter is configured: the corresponding instance type uses preemptible instances, and the price ceiling is specified. The unit is CNY. Pay-as-you-go billing is supported.

    • When this parameter is not configured: the corresponding instance type is a regular pay-as-you-go instance.

  • capacity: configures the upper limit of the number of replicas that use this instance type. The value can be a number, such as "500", or a string, such as "20%". After this parameter is configured, if the number of replicas of the instance type reaches the upper limit, the instance type is no longer used even if it still has stock resources. 

    For example, if the total number of replicas of the service is 200 and the capacity of instance type A is set to 20%, the service launches at most 40 instances by using instance type A, and the remaining instances are launched by using other specifications.

disable_spot_protection_period

No

This parameter must be set when preemptible instances are used. Valid values:

  • false (default): after a preemptible instance is created, it has a protection period of 1 hour by default. During the protection period, the instance is not released even if the market price exceeds the bid price.

  • true: indicates that the protection period is disabled. Instances without a protection period are always about 10% more cost-effective than instances with a protection period.

networking

vpc_id

No

Virtual Private Cloud (VPC)

vswitch_id

No

The vSwitch ID. Avoid selecting a vSwitch that overlaps with the PAI control CIDR blocks (10.224.0.0/16, 10.240.0.0/12, and 11.0.0.0/8), which may cause mounting exceptions or task startup failures.

security_group_id

No

Security group

destination_cidrs

No

If you are aware of the CIDR block conflict risk but still must use a vSwitch that overlaps with the preceding PAI control CIDR blocks, explicitly set this field to your vSwitch CIDR block (that is, the CIDR of the vSwitch).
Example:

"cloud": {
    "networking": {
      "destination_cidrs": "10.241.28.0/22"
    }
  } 

Replace 10.241.28.0/22 with the CIDR block of the vSwitch that you actually use. This solution may affect access to the service over a direct IP connection.

Example:

{
    "cloud": {
        "computing": {
            "instances": [
                {
                    "type": "ecs.c8i.2xlarge",
                    "spot_price_limit": 1
                },
                {
                    "type": "ecs.c8i.xlarge",
                    "capacity": "20%"
                }
            ],
            "disable_spot_protection_period": false
        },
        "networking": {
            "vpc_id": "vpc-bp1oll7xawovg9*****",
            "vswitch_id": "vsw-bp1jjgkw51nsca1e****",
            "security_group_id": "sg-bp1ej061cnyfn0b*****"
        }
    }
}

containers parameter descriptions

When you deploy a service by using a custom runtime image, for more information, see Deploy a custom image.

Parameter

Required

Description

image

Yes

Required when you deploy by using a runtime image. The address of the runtime image used to deploy the model service.

env

name

No

The name of the environment variable when the runtime image runs.

value

No

The value of the environment variable when the runtime image runs.

command

One of the two is required

The entry command of the runtime image. Only a single command is supported; complex scripts such as cd xxx && python app.py are not supported. Specify such a form by using the script parameter below. The command field is suitable for scenarios in which the runtime image does not contain the /bin/sh command.

script

The script executed at the entry of the runtime image. A relatively complex script form can be specified, with multiple lines separated by \n or semicolons.

port

No

The container port.

Important
  • Because the EAS engine listens on the fixed ports 8080 and 9090, the container port must avoid the ports 8080 and 9090.

  • This port must match the port configured in the command parameter's xxx.py file.

prepare

pythonRequirements

No

The list of python requirements to install before the instance starts. The runtime image must contain the python and pip commands in the system path. The value is in list format, for example:

"prepare": {
  "pythonRequirements": [
    "numpy==1.16.4",
    "absl-py==0.11.0"
  ]
}

pythonRequirementsPath

No

The address of the python requirements.txt file to install before the instance starts. The runtime image must contain the Python and pip commands in the system path. The requirements.txt file can be packaged directly into the runtime image, or mounted into the service instance from external storage, for example:

"prepare": {
  "pythonRequirementsPath": "/data_oss/requirements.txt"
}

networking parameter descriptions

Parameter

Required

Description

gateway

No

The dedicated gateway configured for the EAS service.

gateway_policy

No

  • rate_limit: the global rate limit of the service, that is, the maximum number of requests that the service receives per second.

    • enable: specifies whether to enable rate limiting. A value of true enables rate limiting, and a value of false disables rate limiting.

    • limit: the rate limit value.

      Note

      For services on a Shared Gateway, the default configurations are 1000 QPS for a single service and 10,000 QPS for a service group. A dedicated gateway has no default value.

  • concurrency_limit: the global concurrency control of the service, that is, the maximum number of requests that the service is processing at a given instant. Application Load Balancer (ALB) dedicated gateways do not currently support this setting.

    • enable: specifies whether to enable rate limiting. A value of true enables rate limiting, and a value of false disables rate limiting.

    • limit: the rate limit value.

Rate limiting configuration example:

{
    "networking": {
        "gateway_policy": {
            "rate_limit": {
                "enable": true,
                "limit": 100
            },
            "concurrency_limit": {
                "enable": true,
                "limit": 50
            }
        }
    }
}

autoscaler parameter descriptions

When you deploy a service by using JSON, you can enable horizontal auto-scaling in autoscaler. For metric selection and threshold configuration, see Horizontal auto scaling.

Parameter

Required

Description

min

No

The minimum number of replicas. When the value is 0, replicas are scaled in to 0 during periods without traffic, and new requests must wait for a cold start. Services that use a dedicated gateway do not support scaling out from 0.

max

No

The maximum number of replicas. The maximum value is 1000. After the upper limit is reached, scale-out does not continue even if the load keeps increasing.

scaleStrategies

metricName

Yes

The metric name. Valid values:

  • qps: the QPS threshold per replica.

  • qps1k: the QPS threshold per replica. The value is 1000 times the QPS per replica and is used in scenarios that require decimal precision, with up to 2 decimal places supported. For example, a value of 1250 indicates a threshold of 1.25, that is, scale-out is triggered when the average QPS per replica is greater than 1.25.

  • cpu: the CPU utilization threshold per replica.

  • gpu[util]: the GPU utilization threshold per replica.

  • queue[backlog]: the queue backlog threshold, which applies only to asynchronous services.

  • custom[...]: a custom metric. For more information, see Custom monitoring and auto scaling metrics.

threshold

Yes

The threshold that triggers scaling. The meaning of the value is determined by metricName. Scale-out is triggered after the metric exceeds the threshold and remains above it for longer than the observation window.

behavior

scaleUp.stabilizationWindowSeconds

No

The observation window for scale-out decisions. Unit: seconds. Default value: 0. If the metric falls back below the threshold within this window, this scale-out is canceled. This parameter corresponds to Scale-out Starts in in the console.

scaleDown.stabilizationWindowSeconds

No

The observation window for scale-in decisions. Unit: seconds. Default value: 300. Scale-in is performed only after the metric remains below the threshold throughout this window. This parameter corresponds to Scale-in Starts in in the console.

The following example sets the QPS threshold per replica to 1.25 and retains the default scaling observation windows:

"autoscaler": {
  "min": 1,
  "max": 5,
  "behavior": {
    "scaleUp": {
      "stabilizationWindowSeconds": 0
    },
    "scaleDown": {
      "stabilizationWindowSeconds": 300
    }
  },
  "scaleStrategies": [
    {
      "metricName": "qps1k",
      "threshold": 1250
    }
  ]
}
Note

The thresholds in the example are used only to illustrate the format. When you configure multiple metrics, the system separately calculates the target number of replicas required by each metric and takes the maximum. If you have not evaluated the combined behavior, use only one metric.

sinker parameter descriptions

Parameter

Required

Description

type

No

The following two storage types are supported:

  • maxcompute: MaxCompute, a big data service.

  • sls: Simple Log Service (SLS).

config

maxcompute.project

No

The name of the MaxCompute project.

maxcompute.table

No

The MaxCompute data table.

sls.project

No

The name of the SLS project.

sls.logstore

No

The Logstore of SLS.

The configuration example is as follows:

Store to MaxCompute

"sinker": {
        "type": "maxcompute",
        "config": {
            "maxcompute": {
                "project": "cl****",
                "table": "te****"
            }
        }
    }

Store to Simple Log Service (SLS)

"sinker": {
        "type": "sls",
        "config": {
            "sls": {
                "project": "k8s-log-****",
                "logstore": "d****"
            }
        }
    }

Appendix: JSON configuration examples

The following is an example of how to configure the preceding parameters in a JSON file:

{
  "token": "****M5Mjk0NDZhM2EwYzUzOGE0OGMx****",
  "processor": "tensorflow_cpu_1.12",
  "model_path": "oss://examplebucket/exampledir/",
  "oss_endpoint": "oss-cn-beijing.aliyuncs.com",
  "model_entry": "",
  "model_config": "",
  "processor_path": "",
  "processor_entry": "",
  "processor_mainclass": "",
  "processor_type": "",
  "warm_up_data_path": "",
  "runtime": {
    "enable_crash_block": false
  },
  "unit": {
        "size": 2
    },
  "sinker": {
        "type": "maxcompute",
        "config": {
            "maxcompute": {
                "project": "cl****",
                "table": "te****"
            }
        }
    },
  "cloud": {
    "computing": {
      "instances": [
        {
          "capacity": 800,
          "type": "dedicated_resource"
        },
        {
          "capacity": 200,
          "type": "ecs.c7.4xlarge",
          "spot_price_limit": 3.6
        }
      ],
      "disable_spot_protection_period": true
    },
    "networking": {
            "vpc_id": "vpc-bp1oll7xawovg9t8****",
            "vswitch_id": "vsw-bp1jjgkw51nsca1e****",
            "security_group_id": "sg-bp1ej061cnyfn0b****"
        }
  },
  "autoscaler": {
    "min": 2,
    "max": 5,
    "scaleStrategies": [
      {
        "metricName": "qps",
        "threshold": 10
      }
    ]
  },
  "storage": [
    {
      "mount_path": "/data_oss",
      "oss": {
        "endpoint": "oss-cn-shanghai-internal.aliyuncs.com",
        "path": "oss://bucket/path/"
      }
    }
  ],
  "confidential": {
        "trustee_endpoint": "xx",
        "decryption_key": "xx"
    },
  "metadata": {
    "name": "test_eascmd",
    "resource": "eas-r-9lkbl2jvdm0puv****",
    "instance": 1,
    "workspace_id": "1405**",
    "gpu": 0,
    "cpu": 1,
    "memory": 2000,
    "gpu_memory": 10,
    "gpu_core_percentage": 10,
    "qos": "",
    "cuda": "11.2",
    "enable_grpc": false,
    "enable_webservice": false,
    "rdma": 1,
    "rpc": {
      "batching": false,
      "keepalive": 5000,
      "io_threads": 4,
      "max_batch_size": 16,
      "max_batch_timeout": 50,
      "max_queue_size": 64,
      "worker_threads": 5,
      "rate_limit": 0,
      "enable_sigterm": false
    },
    "rolling_strategy": {
      "max_surge": 1,
      "max_unavailable": 1
    },
    "eas.termination_grace_period": 30,
    "scheduling": {
      "spread": {
        "policy": "host"
      }
    },
    "resource_rebalancing": false,
    "shm_size": 100
  },
  "features": {
    "eas.aliyun.com/extra-ephemeral-storage": "100Gi",
    "eas.aliyun.com/gpu-driver-version": "tesla=550.127.08"
  },
  "networking": {
    "gateway": "gw-m2vkzbpixm7mo****"
  },
  "containers": [
    {
      "image": "registry-vpc.cn-shanghai.aliyuncs.com/xxx/yyy:zzz",
      "prepare": {
        "pythonRequirements": [
          "numpy==1.16.4",
          "absl-py==0.11.0"
        ]
      },
      "command": "python app.py",
      "port": 8000
    }
  ],
  "dockerAuth": "dGVzdGNhbzoxM*******"
}