AzureML | dask-cloudprovider
# import from Azure ML Python SDK and Dask
from azureml.core import Workspace
from dask.distributed import Client
from dask_cloudprovider import AzureMLCluster
# specify Workspace - authenticate interactively or otherwise
ws = Workspace.from_config() # see https://aka.ms/azureml/workspace
# get (or create) desired Compute Target and Environment (base image + conda/pip installs)
ct = ws.compute_targets[‘cpu-cluster’] # see https://aka.ms/azureml/computetarget
env = ws.environments[‘AzureML-Dask-CPU’] # see https://aka.ms/azureml/environments
# start cluster, print widget and links
cluster = AzureMLCluster(ws, ct, env, initial_node_count=100, jupyter=True)
# optionally, use directly in client
c = Client(cluster) # optionally, use directly in Client