-
Notifications
You must be signed in to change notification settings - Fork 16k
/
machinelearningcompute.bicep
100 lines (88 loc) · 2.62 KB
/
machinelearningcompute.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Creates compute resources in the specified machine learning workspace
// Includes Compute Instance, Compute Cluster and attached Azure Kubernetes Service compute types
@description('Prefix for resource names')
param prefix string
@description('Azure Machine Learning workspace to create the compute resources in')
param machineLearning string
@description('Azure region of the deployment')
param location string
@description('Tags to add to the resources')
param tags object
@description('Resource ID of the compute subnet')
param computeSubnetId string
@description('Name of the Azure Kubernetes services resource')
param aksName string
@description('Resource ID of the Azure Kubernetes services resource')
param aksSubnetId string
@description('Resource ID of the Azure Kubernetes services resource')
param amlComputePublicIp bool
@description('VM size for the default compute cluster')
param vmSizeParam string
resource machineLearningCluster001 'Microsoft.MachineLearningServices/workspaces/computes@2022-05-01' = {
name: '${machineLearning}/cluster001'
location: location
tags: tags
identity: {
type: 'SystemAssigned'
}
properties: {
computeType: 'AmlCompute'
computeLocation: location
description: 'Machine Learning cluster 001'
disableLocalAuth: true
properties: {
vmPriority: 'Dedicated'
vmSize: vmSizeParam
enableNodePublicIp: amlComputePublicIp
isolatedNetwork: false
osType: 'Linux'
remoteLoginPortPublicAccess: 'Disabled'
scaleSettings: {
minNodeCount: 0
maxNodeCount: 5
nodeIdleTimeBeforeScaleDown: 'PT120S'
}
subnet: {
id: computeSubnetId
}
}
}
}
resource machineLearningComputeInstance001 'Microsoft.MachineLearningServices/workspaces/computes@2022-05-01' = {
name: '${machineLearning}/${prefix}-ci001'
location: location
tags: tags
identity: {
type: 'SystemAssigned'
}
properties: {
computeType: 'ComputeInstance'
computeLocation: location
description: 'Machine Learning compute instance 001'
disableLocalAuth: true
properties: {
applicationSharingPolicy: 'Personal'
computeInstanceAuthorizationType: 'personal'
sshSettings: {
sshPublicAccess: 'Disabled'
}
subnet: {
id: computeSubnetId
}
vmSize: vmSizeParam
}
}
}
module machineLearningAksCompute 'privateaks.bicep' = {
name: aksName
scope: resourceGroup()
params: {
location: location
tags: tags
aksClusterName: aksName
computeName: aksName
aksSubnetId: aksSubnetId
workspaceName: machineLearning
vmSizeParam: vmSizeParam
}
}