1234567891011121314151617181920212223242526272829303132333435 |
- def create_run_config(cpu_cluster, docker_proc_type, conda_env_file):
- """
- AzureML requires the run environment to be setup prior to submission.
- This configures a docker persistent compute. Even though
- it is called Persistent compute, AzureML handles startup/shutdown
- of the compute environment.
- Args:
- cpu_cluster (str) : Names the cluster for the test
- In the case of unit tests, any of
- the following:
- - Reco_cpu_test
- - Reco_gpu_test
- docker_proc_type (str) : processor type, cpu or gpu
- conda_env_file (str) : filename which contains info to
- set up conda env
- Return:
- run_amlcompute : AzureML run config
- """
-
-
- run_amlcompute = RunConfiguration()
- run_amlcompute.target = cpu_cluster
- run_amlcompute.environment.docker.enabled = True
- run_amlcompute.environment.docker.base_image = docker_proc_type
-
-
-
-
- run_amlcompute.environment.python.user_managed_dependencies = False
- run_amlcompute.environment.python.conda_dependencies = CondaDependencies(
- conda_dependencies_file_path=conda_env_file)
- return run_amlcompute
|