我使用 Microsoft Azure 机器学习 (Azure-ml) 来运行我的 (python) 实验。
为了指定我使用的 VM 和 python 环境:
from azureml.core import Environment
from azureml.core import ScriptRunConfig
# Other imports and code...
# Specify VM and Python environment:
vm_env = Environment.from_conda_specification(name='my-test-env', file_path=PATH_TO_YAML_FILE)
vm_env.docker.enabled = True
vm_env.docker.base_image = 'mcr.microsoft.com/azureml/openmpi3.1.2-cuda10.2-cudnn7-ubuntu18.04'
# Finally, use the environment in the ScriptRunConfig:
src = ScriptRunConfig(source_directory=DEPLOY_CONTAINER_FOLDER_PATH,
script=SCRIPT_FILE_TO_EXECUTE,
arguments=EXECUTE_ARGUMENTS,
compute_target=compute_target,
environment=vm_env)
我收到以下警告vm_env.docker.enabled = True
:
'enabled' is deprecated. Please use the azureml.core.runconfig.DockerConfiguration object with the 'use_docker' param instead.
关于DockerSection Class
and的文档DockerConfiguration Class
对于应用DockerConfiguration Class
.
我不知道如何使用该azureml.core.runconfig.DockerConfiguration
对象。有人可以给我一个例子吗?谢谢!