Skip to content

Commit 72476cf

Browse files
authored
Merge pull request #268926 from sdgilley/sdg-freshness
Freshness: how to customize and how to manage compute
2 parents a5f3fbb + 015657a commit 72476cf

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

articles/machine-learning/how-to-create-attach-compute-studio.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ ms.author: vijetaj
88
ms.reviewer: sgilley
99
ms.service: machine-learning
1010
ms.subservice: compute
11-
ms.date: 08/11/2022
11+
ms.date: 03/04/2024
1212
ms.topic: how-to
1313
ms.custom: build-2023
1414
---
15+
1516
# Manage compute resources for model training and deployment in studio
1617

1718
In this article, learn how to manage the compute resources you use for model training and deployment in Azure Machine studio.
@@ -37,7 +38,7 @@ To see all compute targets for your workspace, use the following steps:
3738

3839
1. Select tabs at the top to show each type of compute target.
3940

40-
:::image type="content" source="media/how-to-create-attach-studio/compute-targets.png" alt-text="View list of compute targets":::
41+
:::image type="content" source="media/how-to-create-attach-studio/compute-targets.png" alt-text="Screenshot of view list of compute targets." lightbox="media/how-to-create-attach-studio/compute-targets.png":::
4142

4243
[!INCLUDE [retiring vms](./includes/retiring-vms.md)]
4344

articles/machine-learning/how-to-customize-compute-instance.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ services: machine-learning
66
ms.service: machine-learning
77
ms.subservice: compute
88
ms.topic: how-to
9-
ms.author: jcioffi
10-
author: jesscioffi
9+
ms.author: vijetaj
10+
author: vijetajo
1111
ms.reviewer: sgilley
12-
ms.date: 05/04/2022
12+
ms.date: 03/13/2024
1313
---
1414

15-
# Customize the compute instance with a script
15+
# Customize the compute instance with a script
1616

1717
Use a setup script for an automated way to customize and configure a compute instance at provisioning time.
1818

19-
Use a compute instance as your fully configured and managed development environment in the cloud. For development and testing, you can also use the instance as a [training compute target](concept-compute-target.md#training-compute-targets) or for an [inference target](concept-compute-target.md#compute-targets-for-inference). A compute instance can run multiple jobs in parallel and has a job queue. As a development environment, a compute instance can't be shared with other users in your workspace.
19+
Use a compute instance as your fully configured and managed development environment in the cloud. For development and testing, you can also use the instance as a [training compute target](concept-compute-target.md#training-compute-targets) or for an [inference target](concept-compute-target.md#compute-targets-for-inference). A compute instance can run multiple jobs in parallel and has a job queue. As a development environment, a compute instance can't be shared with other users in your workspace.
2020

2121
As an administrator, you can write a customization script to be used to provision all compute instances in the workspace according to your requirements. You can configure your setup script as a Creation script, which will run once when the compute instance is created. Or you can configure it as a Startup script, which will run every time the compute instance is started (including initial creation).
2222

@@ -32,19 +32,19 @@ Some examples of what you can do in a setup script:
3232

3333
## Create the setup script
3434

35-
The setup script is a shell script, which runs as `rootuser`. Create or upload the script into your **Notebooks** files:
35+
The setup script is a shell script, which runs as `rootuser`. Create or upload the script into your **Notebooks** files:
3636

3737
1. Sign into the [studio](https://ml.azure.com) and select your workspace.
38-
2. On the left, select **Notebooks**
39-
3. Use the **Add files** tool to create or upload your setup shell script. Make sure the script filename ends in ".sh". When you create a new file, also change the **File type** to *bash(.sh)*.
38+
1. On the left, select **Notebooks**.
39+
1. Use the **Add files** tool to create or upload your setup shell script. Make sure the script filename ends in ".sh". When you create a new file, also change the **File type** to *bash(.sh)*.
4040

4141
:::image type="content" source="media/how-to-create-manage-compute-instance/create-or-upload-file.png" alt-text="Create or upload your setup script to Notebooks file in studio":::
4242

4343
When the script runs, the current working directory of the script is the directory where it was uploaded. For example, if you upload the script to **Users>admin**, the location of the script on the compute instance and current working directory when the script runs is */home/azureuser/cloudfiles/code/Users/admin*. This location enables you to use relative paths in the script.
4444

4545
Script arguments can be referred to in the script as $1, $2, etc.
4646

47-
If your script was doing something specific to azureuser such as installing conda environment or Jupyter kernel, you'll have to put it within `sudo -u azureuser` block like this
47+
If your script was doing something specific to azureuser such as installing conda environment or Jupyter kernel, put it within `sudo -u azureuser` block like this:
4848

4949
:::code language="bash" source="~/azureml-examples-main/setup/setup-ci/install-pip-package.sh":::
5050

@@ -71,13 +71,11 @@ Once you store the script, specify it during creation of your compute instance:
7171
1. On the left, select **Compute**.
7272
1. Select **+New** to create a new compute instance.
7373
1. [Fill out the form](how-to-create-compute-instance.md?tabs=azure-studio#create).
74-
1. On the second page of the form, open **Show advanced settings**.
75-
1. Turn on **Provision with setup script**.
76-
1. Select either **Creation script** or **Startup script** tab.
77-
1. Browse to the shell script you saved. Or upload a script from your computer.
74+
1. On the **Applications** page of the form, toggle on the type of script you want to use, creation script (run once when creating the compute instance) or startup script (run every time the compute instance is started).
75+
1. Browse to the shell script you saved. Or upload a script from your computer.
7876
1. Add command arguments as needed.
7977

80-
:::image type="content" source="media/how-to-create-manage-compute-instance/setup-script.png" alt-text="Provision a compute instance with a setup script in the studio.":::
78+
:::image type="content" source="media/how-to-create-manage-compute-instance/setup-script.png" alt-text="Screenshot of provision a compute instance with a setup script in the studio." lightbox="media/how-to-create-manage-compute-instance/setup-script.png":::
8179

8280
> [!TIP]
8381
> If workspace storage is attached to a virtual network you might not be able to access the setup script file unless you are accessing the studio from within virtual network.
@@ -101,7 +99,7 @@ In a Resource Manager [template](https://github.com/Azure/azure-quickstart-templ
10199
`scriptData` above specifies the location of the creation script in the notebooks file share such as `Users/admin/testscript.sh`.
102100
`scriptArguments` is optional above and specifies the arguments for the creation script.
103101

104-
You could instead provide the script inline for a Resource Manager template. The shell command can refer to any dependencies uploaded into the notebooks file share. When you use an inline string, the working directory for the script is `/mnt/batch/tasks/shared/LS_root/mounts/clusters/**ciname**/code/Users`.
102+
You could instead provide the script inline for a Resource Manager template. The shell command can refer to any dependencies uploaded into the notebooks file share. When you use an inline string, the working directory for the script is `/mnt/batch/tasks/shared/LS_root/mounts/clusters/**\<ciname\>**/code/Users`.
105103

106104
For example, specify a base64 encoded command string for `scriptData`:
107105

@@ -121,7 +119,7 @@ For example, specify a base64 encoded command string for `scriptData`:
121119

122120
Logs from the setup script execution appear in the logs folder in the compute instance details page. Logs are stored back to your notebooks file share under the `Logs\<compute instance name>` folder. Script file and command arguments for a particular compute instance are shown in the details page.
123121

124-
## Next steps
122+
## Related resources
125123

126124
* [Access the compute instance terminal](how-to-access-terminal.md)
127125
* [Create and manage files](how-to-manage-files.md)
-25 KB
Loading
-33.7 KB
Loading
-3.13 KB
Loading
-2.51 KB
Loading
-24.7 KB
Loading

0 commit comments

Comments
 (0)