Skip to content

Commit

Permalink
clean up and open script layout
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeiland committed Feb 19, 2024
1 parent 53d408a commit 78f7b8e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
11 changes: 10 additions & 1 deletion deploy/amlhpc_simple.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,23 @@ resource amlLoginVM 'Microsoft.MachineLearningServices/workspaces/computes@2023-
subnet: {
id: subnetClusterId
}
customServices: [{
environmentVariables: {
test_variable: {
type: 'local'
value: '12345'
}
}
}]
vmSize: 'Standard_F2s_v2'
setupScripts: {
scripts: {
creationScript: {
scriptSource : 'inline'
scriptData: base64('''
pip install amlhpc
echo "export SUBSCRIPTION=${subscription().subscriptionId}" > /etc/profile.d/amlhpc.sh
#echo "export SUBSCRIPTION=${subscription().subscriptionId}" > /etc/profile.d/amlhpc.sh
echo "export SUBSCRIPTION=$test_variable" > /etc/profile.d/amlhpc.sh
''')
}
startupScript: {
Expand Down
14 changes: 12 additions & 2 deletions deploy/amlhpc_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.24.24.22086",
"templateHash": "3905114379493833843"
"templateHash": "4455719693739351355"
}
},
"parameters": {
Expand Down Expand Up @@ -175,12 +175,22 @@
"subnet": {
"id": "[variables('subnetClusterId')]"
},
"customServices": [
{
"environmentVariables": {
"test_variable": {
"type": "local",
"value": "12345"
}
}
}
],
"vmSize": "Standard_F2s_v2",
"setupScripts": {
"scripts": {
"creationScript": {
"scriptSource": "inline",
"scriptData": "[base64('pip install amlhpc \necho \"export SUBSCRIPTION=${subscription().subscriptionId}\" > /etc/profile.d/amlhpc.sh\n')]"
"scriptData": "[base64('pip install amlhpc \n#echo \"export SUBSCRIPTION=${subscription().subscriptionId}\" > /etc/profile.d/amlhpc.sh\necho \"export SUBSCRIPTION=$test_variable\" > /etc/profile.d/amlhpc.sh\n')]"
},
"startupScript": {
"scriptSource": "inline",
Expand Down

0 comments on commit 78f7b8e

Please sign in to comment.