Skip to content

AML: Clarify what DockerConfiguration does in train-on-amlcompute.ipynbΒ #1485

Open
@hamelsmu

Description

@hamelsmu

@keijik @cody-dkdc @gregce

In this notebook we are setting a docker configuration, and later passing that to the docker_runtime parameter

from azureml.core import Environment
from azureml.core.runconfig import DockerConfiguration
from azureml.core.conda_dependencies import CondaDependencies

myenv = Environment("myenv")
myenv.python.conda_dependencies = CondaDependencies.create(conda_packages=['scikit-learn', 'packaging'])
# Enable Docker
docker_config = DockerConfiguration(use_docker=True)

....
from azureml.core import ScriptRunConfig
src = ScriptRunConfig(source_directory=project_folder, 
                      script='train.py', 
                      compute_target=cpu_cluster, 
                      environment=myenv,
                      docker_runtime_config=docker_config)

run = experiment.submit(config=src)

Since we are using conda dependencies and are not specifying a base image, what is Docker doing exactly then?

The example works just fine if we omit the docker_config completely. So what is this example trying to show? What is the difference between passing this config and not passing it in practice?

Metadata

Metadata

Assignees

Labels

ADOIssue is documented on MSFT ADO for internal trackingEnvironmentsFailures to provision environmentMLOpsdoc-enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions