File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
ignore/doc-qa/how-to-set-up-training-targets Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ # Code for Remote virtual machines
2+
3+ compute_target_name = "attach-dsvm"
4+
5+ #<run_dsvm>
6+ import azureml .core
7+ from azureml .core .runconfig import RunConfiguration , DEFAULT_CPU_IMAGE
8+ from azureml .core .conda_dependencies import CondaDependencies
9+
10+ run_dsvm = RunConfiguration (framework = "python" )
11+
12+ # Set the compute target to the Linux DSVM
13+ run_dsvm .target = compute_target_name
14+
15+ # Use Docker in the remote VM
16+ run_dsvm .environment .docker .enabled = True
17+
18+ # Use the CPU base image
19+ # To use GPU in DSVM, you must also use the GPU base Docker image "azureml.core.runconfig.DEFAULT_GPU_IMAGE"
20+ run_dsvm .environment .docker .base_image = azureml .core .runconfig .DEFAULT_CPU_IMAGE
21+ print ('Base Docker image is:' , run_dsvm .environment .docker .base_image )
22+
23+ # Prepare the Docker and conda environment automatically when they're used for the first time
24+ run_dsvm .prepare_environment = True
25+
26+ # Specify the CondaDependencies object
27+ run_dsvm .environment .python .conda_dependencies = CondaDependencies .create (conda_packages = ['scikit-learn' ])
28+ #</run_dsvm>
You can’t perform that action at this time.
0 commit comments