**** this par only works with Azure ML Workbench ******
az login
az provider register -n Microsoft.MachineLearningCompute
az provider register -n Microsoft.ContainerRegistry
az provider register -n Microsoft.ContainerService
az provider show -n Microsoft.MachineLearningCompute
az provider show -n Microsoft.MachineLearningCompute -o table
az ml env setup -l [Azure Region, e.g. eastus2] -n [your environment name] [-g [existing resource group]]
az ml env setup -l westEurope -n mlgetonboard -g GetOnboard-rg
The command above creates default ACR in provided resource group. All the containers will use this environment later and containers will be pushed to that registry
To change the resgitry you can use docker command
docker tag --help
example:
docker images
#see all aimges created with associated ACR
docker tag mlcrpacrdab009332683.azurecr.io/mlgob1:3 mlgob.azurecr.io/mlgob1:1
docker push mlgob.azurecr.io/mlgob1
azml env setup command created own registry with funny name . This also can probablyl be changed in aml_config dir in the Azure Workbech workiing directory if you started cmd prompt from Azure Workbench like I am, look at config and yml files inside this dir
az ml service create realtime --model-file model.pkl -f iot_score.py -n mlgob -r python
check : on portal: go to ACR, it says running
**** this par only works with Azure ML Workbench ******
on portal: create iot edge service in iot hub cmd: install iotedgectl iotedgectl setup --connection-string "lkajsdfklj" --nopass iotedgectl start
on portal : add iotedge device
iotedgectl login --address --username --password
iotedgectl stop
iotedgectl uninstall
docker system prune -a -f
iotedgectl setup --connection-string "lkajsdfklj" --nopass
iotedgectl start
docker logs -f edgeAgent
Sample:
{
"routes": {
"sensorToMachineLearning": "FROM /messages/modules/tempSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/mlgob/inputs/amlInput\")",
"machineLearningToIoTHub": "FROM /messages/modules/mlgob/outputs/amlOutput INTO $upstream"
}
}