You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-create-attach-compute-studio.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,11 @@ ms.author: vijetaj
8
8
ms.reviewer: sgilley
9
9
ms.service: machine-learning
10
10
ms.subservice: compute
11
-
ms.date: 08/11/2022
11
+
ms.date: 03/04/2024
12
12
ms.topic: how-to
13
13
ms.custom: build-2023
14
14
---
15
+
15
16
# Manage compute resources for model training and deployment in studio
16
17
17
18
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:
37
38
38
39
1. Select tabs at the top to show each type of compute target.
39
40
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":::
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-customize-compute-instance.md
+14-16Lines changed: 14 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,17 @@ services: machine-learning
6
6
ms.service: machine-learning
7
7
ms.subservice: compute
8
8
ms.topic: how-to
9
-
ms.author: jcioffi
10
-
author: jesscioffi
9
+
ms.author: vijetaj
10
+
author: vijetajo
11
11
ms.reviewer: sgilley
12
-
ms.date: 05/04/2022
12
+
ms.date: 03/13/2024
13
13
---
14
14
15
-
# Customize the compute instance with a script
15
+
# Customize the compute instance with a script
16
16
17
17
Use a setup script for an automated way to customize and configure a compute instance at provisioning time.
18
18
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.
20
20
21
21
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).
22
22
@@ -32,19 +32,19 @@ Some examples of what you can do in a setup script:
32
32
33
33
## Create the setup script
34
34
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:
36
36
37
37
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)*.
40
40
41
41
:::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":::
42
42
43
43
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.
44
44
45
45
Script arguments can be referred to in the script as $1, $2, etc.
46
46
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:
@@ -71,13 +71,11 @@ Once you store the script, specify it during creation of your compute instance:
71
71
1. On the left, select **Compute**.
72
72
1. Select **+New** to create a new compute instance.
73
73
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.
78
76
1. Add command arguments as needed.
79
77
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":::
81
79
82
80
> [!TIP]
83
81
> 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
101
99
`scriptData` above specifies the location of the creation script in the notebooks file share such as `Users/admin/testscript.sh`.
102
100
`scriptArguments` is optional above and specifies the arguments for the creation script.
103
101
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`.
105
103
106
104
For example, specify a base64 encoded command string for `scriptData`:
107
105
@@ -121,7 +119,7 @@ For example, specify a base64 encoded command string for `scriptData`:
121
119
122
120
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.
123
121
124
-
## Next steps
122
+
## Related resources
125
123
126
124
*[Access the compute instance terminal](how-to-access-terminal.md)
127
125
*[Create and manage files](how-to-manage-files.md)
0 commit comments