generated from MicrosoftLearning/mslearn-mlops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands.txt
48 lines (22 loc) · 1.42 KB
/
commands.txt
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
## https://docs.microsoft.com/en-us/cli/azure/ml?view=azure-cli-latest
## https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-overview
## https://github.com/Azure/azureml-examples/tree/main/cli/assets
az login
az account set -s ""
$env:GROUP="mlops-dev-rg"
$env:SUBSCRIPTION=""
$env:LOCATION="eastus"
$env:WORKSPACE="mlops-dev"
$env:DATASET="./data/diabetes-dev.csv"
$env:GROUP="selhousseini-rg"
$env:LOCATION="eastus"
$env:WORKSPACE="mlops-prod"
$env:DATASET="./data/diabetes-dev.csv"
az configure --defaults group=$env:GROUP workspace=$env:WORKSPACE location=$env:LOCATION
az configure -l -o table
az ml data create --workspace-name $env:WORKSPACE --resource-group $env:GROUP --file local-folder.yml
az ml compute create --file compute.yml --workspace-name $env:WORKSPACE --resource-group $env:GROUP
az ml job create --file job.yml --workspace-name $env:WORKSPACE --resource-group $env:GROUP
az ad sp create-for-rbac --name "guthub-service-principal" --role contributor --scopes /subscriptions/[subs-id]/resourceGroups/mlops-dev-rg --sdk-auth
az ad sp create-for-rbac --name "github-service-principal-prod" --role contributor --scopes /subscriptions/[subs-id]/resourceGroups/selhousseini-rg --sdk-auth
az ml model create --name "diabetes-prod-model" --type "mlflow_model" --path "azureml://jobs/plum_island_3cnjygc1pf/outputs/artifacts/model" --workspace-name $env:WORKSPACE --resource-group $env:GROUP