Check on this - https://medium.com/codex/using-bicep-to-create-workspace-resources-and-get-started-with-azure-machine-learning-bcc57fd4fd09
Azure create no bicep related, you need to search for external resource
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I'm trying to deploy an environment and environment version to Azure ML using Bicep. The documentation doesn't have any examples, and I keep getting an unhelpful error stating:
"The response for resource had empty or invalid content."
Can anyone provide a working example deploying the following two resources:
Microsoft.MachineLearningServices/workspaces/environments@2021-03-01-preview
Microsoft.MachineLearningServices/workspaces/environments/versions@2021-03-01-preview
My config is like this and it can successfully deploy the cluster, but not the environment and version:
param location string = resourceGroup().location
resource amlCluster 'Microsoft.MachineLearningServices/workspaces/computes@2022-01-01-preview' = {
name: 'workspaceA/cluster'
location: location
tags: {
project: 'projectA'
}
identity: {
type: 'SystemAssigned'
}
properties: {
computeLocation: location
computeType: 'AmlCompute'
properties: {
osType: 'Linux'
vmSize: 'STANDARD_D1'
scaleSettings: {
minNodeCount: 0
maxNodeCount: 2
}
subnet: null
}
}
}
// Create environment
resource amlEnv 'Microsoft.MachineLearningServices/workspaces/environments@2021-03-01-preview' = {
name: 'workspaceA/env'
properties: {
properties: {}
tags: {}
}
}
resource amlEnvVersion 'Microsoft.MachineLearningServices/workspaces/environments/versions@2021-03-01-preview' = {
name: 'env-version'
parent: amlEnv
properties: {
properties: {}
isAnonymous: false
docker: {
platform: {
operatingSystemType: 'Linux'
}
dockerSpecificationType: 'Image'
dockerImageUri: 'mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04'
}
condaFile: 'conda.yml'
}
}
Check on this - https://medium.com/codex/using-bicep-to-create-workspace-resources-and-get-started-with-azure-machine-learning-bcc57fd4fd09
Azure create no bicep related, you need to search for external resource
Hi, I had the same issue. I could not create a custom environment and then a version as stated in the documentation and even when you export the ARM template from existing resources. Then by the 'try/fail' approach, I found that I don't need to create an 'environments' resource at all, only the 'environments/version' is enough, but need to specify the valid path in the 'name' property.
param ml_workspace_name string = 'my-workspace'
param ml_cust_env_name string = 'MY_CUSTOM_ENV'
param ml_cust_env_version string = '1'
param ml_cust_env_image string = 'myacr.azurecr.io/my-image:dev'
resource ml_cust_env 'Microsoft.MachineLearningServices/workspaces/environments/versions@2022-05-01' = {
name: '${ml_workspace_name}/${ml_cust_env_name}/${ml_cust_env_version}'
properties: {
image: ml_cust_env_image
osType: 'Linux'
}
}