-
Notifications
You must be signed in to change notification settings - Fork 1.4k
227 lines (227 loc) · 11 KB
/
bootstrapping-resources.yml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
name: bootstrapping-resources
on:
workflow_dispatch:
schedule:
- cron: "0 */6 * * *"
pull_request:
branches:
- main
paths:
- sdk/**
- .github/workflows/bootstrapping-resources.yml
- cli/**
- infra/bootstrapping/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: check out repo
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: pip install notebook reqs
run: pip install -r sdk/python/dev-requirements.txt
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZUREML_CREDENTIALS}}
- name: bootstrap resources
run: |
echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}';
bash bootstrap.sh
working-directory: infra/bootstrapping
continue-on-error: true
- name: setup SDK
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash setup.sh
working-directory: sdk/python
continue-on-error: true
- name: setup-cli
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash setup.sh
working-directory: cli
continue-on-error: true
- name: cli-automl-image-classification-multilabel-task-fridge-items.yml
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../.azureml/config.json";
working-directory: cli/jobs/automl-standalone-jobs/cli-automl-image-classification-multilablel-task-fridge-items
timeout-minutes: 30
continue-on-error: true
- name: cli-automl-image-classification-multiclass-task-fridge-items.yml
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../.azureml/config.json";
working-directory: cli/jobs/automl-standalone-jobs/cli-automl-image-classification-multiclass-task-fridge-items
timeout-minutes: 30
continue-on-error: true
- name: cli-automl-image-instance-segmentation-task-fridge-items.yml
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../.azureml/config.json";
working-directory: cli/jobs/automl-standalone-jobs/cli-automl-image-instance-segmentation-task-fridge-items
timeout-minutes: 30
continue-on-error: true
- name: cli-automl-image-object-detection-task-fridge-items.yml
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../.azureml/config.json";
working-directory: cli/jobs/automl-standalone-jobs/cli-automl-image-object-detection-task-fridge-items
timeout-minutes: 30
continue-on-error: true
- name: image-instance-segmentation-task-fridge-items-pipeline.yml
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../.azureml/config.json";
working-directory: cli/jobs/pipelines/automl/image-instance-segmentation-task-fridge-items-pipeline
timeout-minutes: 30
continue-on-error: true
- name: image-multiclass-classification-fridge-items-pipeline.yml
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../.azureml/config.json";
working-directory: cli/jobs/pipelines/automl/image-multiclass-classification-fridge-items-pipeline
timeout-minutes: 30
continue-on-error: true
- name: image-multilabel-classification-fridge-items-pipeline.yml
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../.azureml/config.json";
working-directory: cli/jobs/pipelines/automl/image-multilabel-classification-fridge-items-pipeline
timeout-minutes: 30
continue-on-error: true
- name: image-object-detection-task-fridge-items-pipeline.yml
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../.azureml/config.json";
working-directory: cli/jobs/pipelines/automl/image-object-detection-task-fridge-items-pipeline
timeout-minutes: 30
continue-on-error: true
- name: set sampledata dataset
if: ${{ always() }}
run: |
set -x
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
pip install azure.cli.core
pip install azureml-core
pip install azureml-dataset-runtime
python -c '
import sys
from azureml.core.workspace import Workspace
from azureml.core import Dataset
from azureml.core.authentication import AzureCliAuthentication
cli_auth = AzureCliAuthentication()
ws = Workspace.get(subscription_id=sys.argv[1],
resource_group=sys.argv[2],
name=sys.argv[3],
auth=cli_auth)
datastore = ws.datastores["workspaceblobstore"]
Dataset.File.upload_directory("example-data", (datastore, "example-data"))
dataset = Dataset.File.from_files(path=[(datastore, "example-data")])
dataset.register(ws, "sampledata")
' "$SUBSCRIPTION_ID" "$RESOURCE_GROUP_NAME" "$WORKSPACE_NAME"
working-directory: cli/assets/data
timeout-minutes: 300
continue-on-error: true
- name: create asset for cli/jobs/pipelines-with-components/basics/1b_e2e_registered_components
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
set -x
az ml component create --file train.yml
az ml component create --file score.yml
az ml component create --file eval.yml
# az ml component create --file pipeline.yml
working-directory: cli/jobs/pipelines-with-components/basics/1b_e2e_registered_components
timeout-minutes: 30
continue-on-error: true
- name: setup env for cli/jobs/pipelines-with-components/rai_pipeline_adult_analyse/
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
set -x
az ml environment create --file environment/responsibleai-environment.yaml
az ml data create --file data/data_adult_train.yaml
az ml data create --file data/data_adult_test.yaml
working-directory: cli/jobs/pipelines-with-components/rai_pipeline_adult_analyse/
timeout-minutes: 30
continue-on-error: true
- name: Please manually setup uri_file for cli/jobs/pipelines-with-components/basics/4b_datastore_datapath_uri/pipeline.yml
if: ${{ always() }}
run: |
echo Please manually setup uri_file for cli/jobs/pipelines-with-components/basics/4b_datastore_datapath_uri/pipeline.yml
az ml component create --file ./pipeline.yml
working-directory: cli/jobs/pipelines-with-components/basics/4b_datastore_datapath_uri
timeout-minutes: 30
continue-on-error: true
- name: setup_asset /cli/assets/data/local-folder.yml
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
set -x
az ml data create --subscription $SUBSCRIPTION_ID --resource-group $RESOURCE_GROUP_NAME --workspace $WORKSPACE_NAME -f ./local-folder.yml
working-directory: cli/assets/data
timeout-minutes: 300
continue-on-error: true
- name: setup_dataset
if: ${{ always() }}
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
set -x
bash create-datasets.sh
working-directory: setup/setup-repo
timeout-minutes: 300
continue-on-error: true
- name: azcopy install
if: ${{ always() }}
run: |
echo "installing azcopy"
sudo mkdir -p /home/azcopy/
curl -L https://aka.ms/downloadazcopy-v10-linux | tar -zxf - --directory /home/azcopy/
sudo mv $(find /home/azcopy/ -type f -name azcopy) /usr/bin/
- name: azcopy sync
env:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
run: |
# login to azcopy with AZURE_CREDENTIALS
export AZCOPY_SPA_CLIENT_SECRET=$(echo $AZURE_CREDENTIALS | jq '.clientSecret' -r)
export AZCOPY_SPA_APP_ID=$(echo $AZURE_CREDENTIALS | jq '.clientId' -r)
export AZCOPY_SPA_TENANT_ID=$(echo $AZURE_CREDENTIALS | jq '.tenantId' -r)
azcopy login --service-principal --application-id $AZCOPY_SPA_APP_ID --tenant-id $AZCOPY_SPA_TENANT_ID
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
source "${{ github.workspace }}/infra/bootstrapping/init_environment.sh";
echo_title "Copying data"
# bash "$SCRIPT_DIR"/sdk_helpers.sh install_azcopy
bash "$SCRIPT_DIR"/sdk_helpers.sh copy_dataset
working-directory: infra/bootstrapping
continue-on-error: true