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 """ # runconfig with max_run_duration_seconds did not work, check why: # run_amlcompute = RunConfiguration(max_run_duration_seconds=60*30) run_amlcompute = RunConfiguration() run_amlcompute.target = cpu_cluster run_amlcompute.environment.docker.enabled = True run_amlcompute.environment.docker.base_image = docker_proc_type # Use conda_dependencies.yml to create a conda environment in # the Docker image for execution # False means the user will provide a conda file for setup # True means the user will manually configure the environment 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