DockerBuildContext 类

定义 Docker 生成上下文。

DockerBuildContext 构造函数类。

构造函数

DockerBuildContext(location_type=None, ___location=None, dockerfile_path='Dockerfile')

参数

名称 说明
location_type
默认值: None
___location
默认值: None
dockerfile_path
默认值: Dockerfile

变量

名称 说明
azureml.core.environment.DockerBuildContext.location_type

Docker 生成上下文位置的类型

azureml.core.environment.DockerBuildContext.___location

Docker 生成上下文位置。

dockerfile_path
str

相对于生成上下文根目录的 Dockerfile 的路径,默认为 Dockerfile。

方法

from_local_directory

从包含 Docker 生成上下文的本地目录创建 DockerBuildContext 对象。

from_local_directory

从包含 Docker 生成上下文的本地目录创建 DockerBuildContext 对象。

static from_local_directory(workspace, path, dockerfile_path='Dockerfile')

参数

名称 说明
workspace
必需

在其中创建环境的工作区。

path
必需
str

包含 Docker 生成上下文的目录的路径。

dockerfile_path
str

Dockerfile 路径相对于 Docker 生成上下文的根目录,默认为 Dockerfile。

默认值: Dockerfile

返回

类型 说明

DockerBuildContext 对象。