ContainerImageConfig 類別
定義容器部署特有的映射組態設定 - 需要執行腳本和執行時間。
在一般使用案例中,您將使用 image_configuration
類別的 ContainerImage 方法來建立 ContainerImageConfig 物件。
初始化 config 物件。
- 繼承
-
ContainerImageConfig
建構函式
ContainerImageConfig(execution_script, runtime, conda_file=None, docker_file=None, schema_file=None, dependencies=None, enable_gpu=None, tags=None, properties=None, description=None, base_image=None, base_image_registry=None, allow_absolute_path=False, cuda_version=None)
參數
- enable_gpu
- bool
是否要在映射中啟用 GPU 支援。 GPU 映射必須用於 Microsoft Azure 服務,例如 Azure 容器執行個體、Azure Machine Learning Compute、Azure 虛擬機器 和 Azure Kubernetes Service。 預設為 False。
- cuda_version
- str
要針對需要 GPU 支援的映射安裝 CUDA 版本。 GPU 映射必須用於 Microsoft Azure 服務,例如 Azure 容器執行個體、Azure Machine Learning Compute、Azure 虛擬機器 和 Azure Kubernetes Service。 支援的版本為 9.0、9.1 和 10.0。 如果已設定 'enable_gpu',則預設為 '9.1'。
- enable_gpu
- bool
是否要在映射中啟用 GPU 支援。 GPU 映射必須用於 Microsoft Azure 服務,例如 Azure 容器執行個體、Azure Machine Learning Compute、Azure 虛擬機器 和 Azure Kubernetes Service。 預設為 False。
- cuda_version
- str
要針對需要 GPU 支援的映射安裝 CUDA 版本。 GPU 映射必須用於 Microsoft Azure 服務,例如 Azure 容器執行個體、Azure Machine Learning Compute、Azure 虛擬機器 和 Azure Kubernetes Service。 支援的版本為 9.0、9.1 和 10.0。 如果已設定 'enable_gpu',則預設為 '9.1'。
方法
build_create_payload |
建置容器映射的建立承載。 |
create_local_debug_payload |
建置容器映射的建立承載。 |
validate_configuration |
檢查指定的組態值是否有效。 如果驗證失敗,會引發 :class:azureml.exceptions.WebserviceException'。 |
build_create_payload
建置容器映射的建立承載。
build_create_payload(workspace, name, model_ids)
參數
傳回
容器映射建立承載。
傳回類型
例外狀況
create_local_debug_payload
建置容器映射的建立承載。
create_local_debug_payload(workspace, model_ids)
參數
傳回
容器映射建立承載。
傳回類型
例外狀況
validate_configuration
檢查指定的組態值是否有效。
如果驗證失敗,會引發 :class:azureml.exceptions.WebserviceException'。
validate_configuration()
例外狀況
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應