

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

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

若要建立可部署到端點或用於批次轉換工作的管道模型，請使用 Amazon SageMaker AI 主控台或 `CreateModel` 操作。

**建立推論管道 (主控台)**

1. 開啟 Amazon SageMaker AI 主控台，網址為 [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/)。

1. 選擇**模型**，然後從**推論** 群組中選擇 **建立模型**。

1. 在**建立模型**頁面，提供模型名稱、選擇 IAM 角色，然後如果您想使用私有 VPC，請指定 VPC 值。  
![\[為推論管道建立模型的頁面。\]](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/images/create-pipeline-model.png)

1. 若要新增關於推論管道中的容器的資訊，請選擇 **Add container (新增容器)**，然後選擇 **Next (下一步)**。

1. 針對每個容器，以您想要的執行容器的順序填寫欄位，最多十五個。填寫 **Container input options (容器輸入選項)**、**Location of inference code image (推論程式碼影像的位置)**，以及 (選擇性) **Location of model artifacts (模型成品的位置)**、**Container host name (容器主機名稱)** 和 **Environmental variables (環境變數)** 欄位。  
![\[建立具有容器的管道模型。\]](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/images/create-pipeline-model-containers.png)

   **MyInferencePipelineModel** 頁面摘要說明可為模型提供輸入的容器的設定。如果您在對應的容器定義中提供環境變數，SageMaker AI 會在 **Environment variables (環境變數)** 欄位中顯示這些環境變數。  
![\[管道模型的容器設定摘要。\]](http://docs.aws.amazon.com/zh_tw/sagemaker/latest/dg/images/pipeline-MyInferencePipelinesModel-recap.png)