

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 创建管道模型
<a name="inference-pipeline-create-console"></a>

要创建可部署到终端节点或用于批量转换任务的管道模型，请使用 Amazon SageMaker AI 控制台或`CreateModel`操作。

**创建推理管道（控制台）**

1. 打开 Amazon A SageMaker I 控制台，网址为[https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/)。

1. 选择**模型**，然后从**推理**组中选择**创建模型**。

1. 在**创建模型**页面上，提供模型名称，选择 IAM 角色；如果您希望使用私有 VPC，请指定 VPC 值。  
![\[用于创建推理管道模型的页面。\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/create-pipeline-model.png)

1. 要添加推理管道中容器的信息，请依次选择 **Add container (添加容器)**、**Next (下一步)**。

1. 按照容器的执行顺序填写每个容器的字段，最多为 15 个容器。填写 **Container input options (容器输入选项)**、**Location of inference code image (推理代码图像的位置)** 以及可选的 **Location of model artifacts (模型构件的位置)**、**Container host name (容器主机名)** 和 **Environmental variables (环境变量)** 字段。  
![\[使用容器创建管道模型。\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/create-pipeline-model-containers.png)

   该**MyInferencePipelineModel**页面汇总了为模型提供输入的容器的设置。如果您在相应的容器定义中提供了环境变量， SageMaker AI 会在**环境变量字段中显示这些变量**。  
![\[管道模型的容器设置的摘要。\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/pipeline-MyInferencePipelinesModel-recap.png)