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-compute-instance.md
+10-20Lines changed: 10 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@ ms.service: machine-learning
7
7
ms.subservice: compute
8
8
ms.custom: devx-track-azurecli
9
9
ms.topic: how-to
10
-
author: jesscioffi
11
-
ms.author: jcioffi
10
+
ms.author: vijetaj
11
+
author: vijetajo
12
12
ms.reviewer: sgilley
13
-
ms.date: 05/03/2024
13
+
ms.date: 06/10/2024
14
14
---
15
15
16
16
# Create an Azure Machine Learning compute instance
@@ -40,11 +40,14 @@ Choose the tab for the environment you're using for other prerequisites.
40
40
41
41
* To use the Python SDK, [set up your development environment with a workspace](how-to-configure-environment.md). Once your environment is set up, attach to the workspace in your Python script:
* To use the CLI, install the [Azure CLI extension for Machine Learning service (v2)](https://aka.ms/sdk-v2-install), [Azure Machine Learning Python SDK (v2)](https://aka.ms/sdk-v2-install), or the [Azure Machine Learning Visual Studio Code extension](how-to-setup-vs-code.md).
47
+
* If you're working on a compute instance, the CLI is already installed. If working on a different computer, install the [Azure CLI extension for Machine Learning service (v2)](https://aka.ms/sdk-v2-install).
48
+
49
+
[!INCLUDE [set-up-cli](includes/set-up-cli.md)]
50
+
48
51
49
52
# [Studio](#tab/azure-studio)
50
53
@@ -123,7 +126,6 @@ Where the file *create-instance.yml* is:
123
126
* If you're using an __Azure Virtual Network__, specify the **Resource group**, **Virtual network**, and **Subnet** to create the compute instance inside an Azure Virtual Network. You can also select __No public IP__ to prevent the creation of a public IP address, which requires a private link workspace. You must also satisfy these [network requirements](./how-to-secure-training-vnet.md) for virtual network setup.
124
127
125
128
* If you're using an Azure Machine Learning __managed virtual network__, the compute instance is created inside the managed virtual network. You can also select __No public IP__ to prevent the creation of a public IP address. For more information, see [managed compute with a managed network](./how-to-managed-network-compute.md).
126
-
* Allow root access. (preview)
127
129
128
130
1. Select **Applications** if you want to add custom applications to use on your compute instance, such as RStudio or Posit Workbench. See [Add custom applications such as RStudio or Posit Workbench](#add-custom-applications-such-as-rstudio-or-posit-workbench).
129
131
1. Select **Tags** if you want to add additional information to categorize the compute instance.
@@ -248,17 +250,6 @@ from azure.ai.ml.constants import TimeZone
248
250
from azure.ai.ml import MLClient
249
251
from azure.identity import DefaultAzureCredential
250
252
251
-
# authenticate
252
-
credential = DefaultAzureCredential()
253
-
254
-
# Get a handle to the workspace
255
-
ml_client = MLClient(
256
-
credential=credential,
257
-
subscription_id="<SUBSCRIPTION_ID>",
258
-
resource_group_name="<RESOURCE_GROUP>",
259
-
workspace_name="<AML_WORKSPACE_NAME>",
260
-
)
261
-
262
253
ci_minimal_name = "ci-name"
263
254
ci_start_time = "2023-06-21T11:47:00" #specify your start time in the format yyyy-mm-ddThh:mm:ss
264
255
@@ -453,8 +444,7 @@ from azure.ai.ml import MLClient
453
444
from azure.identity import ManagedIdentityCredential
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-r-deploy-r-model.md
+3-25Lines changed: 3 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,33 +181,11 @@ These steps assume you have an Azure Container Registry associated with your wor
181
181
1. If you see custom environments, nothing more is needed.
182
182
1. If you don't see any custom environments, create [an R environment](how-to-r-modify-script-for-production.md#create-an-environment), or any other custom environment. (You *won't* use this environment for deployment, but you *will* use the container registry that is also created for you.)
183
183
184
-
Once you have verified that you have at least one custom environment, use the following steps to build a container.
184
+
Once you have verified that you have at least one custom environment, start a terminal and set up the CLI:
185
185
186
-
1. Open a terminal window and sign in to Azure. If you're doing this from an [Azure Machine Learning compute instance](quickstart-create-resources.md#create-a-compute-instance), use:
186
+
[!INCLUDE [set-up-cli](includes/set-up-cli.md)]
187
187
188
-
```azurecli
189
-
az login --identity
190
-
```
191
-
192
-
If you're not on the compute instance, omit `--identity` and follow the prompt to open a browser window to authenticate.
193
-
194
-
1. Make sure you have the most recent versions of the CLI and the `ml` extension:
195
-
196
-
```azurecli
197
-
az upgrade
198
-
```
199
-
200
-
1. If you have multiple Azure subscriptions, set the active subscription to the one you're using for your workspace. (You can skip this step if you only have access to a single subscription.) Replace `<SUBSCRIPTION-NAME>` with your subscription name. Also remove the brackets `<>`.
201
-
202
-
```azurecli
203
-
az account set --subscription "<SUBSCRIPTION-NAME>"
204
-
```
205
-
206
-
1. Set the default workspace. If you're doing this from a compute instance, you can use the following command as is. If you're on any other computer, substitute your resource group and workspace name instead. (You can find these values in [Azure Machine Learning studio](how-to-r-train-model.md#submit-the-job).)
207
-
208
-
```azurecli
209
-
az configure --defaults group=$CI_RESOURCE_GROUP workspace=$CI_WORKSPACE
210
-
```
188
+
After you've set up the CLI, use the following steps to build a container.
1. Open a terminal window and sign in to Azure. If you're using an [Azure Machine Learning compute instance](../quickstart-create-resources.md#create-a-compute-instance), use:
14
+
15
+
```azurecli
16
+
az login --identity
17
+
```
18
+
19
+
If you're not on the compute instance, omit `--identity` and follow the prompt to open a browser window to authenticate.
20
+
21
+
1. Make sure you have the most recent versions of the CLI and the `ml` extension:
22
+
23
+
```azurecli
24
+
az upgrade
25
+
```
26
+
27
+
1. If you have multiple Azure subscriptions, set the active subscription to the one you're using for your workspace. (You can skip this step if you only have access to a single subscription.) Replace `<YOUR_SUBSCRIPTION_NAME_OR_ID>` with either your subscription name or subscription ID. Also remove the brackets `<>`.
1. Set the default workspace. If you're using a compute instance, you can keep the following command as is. If you're on any other computer, substitute your resource group and workspace name instead. (You can find these values in [Azure Machine Learning studio](../how-to-r-train-model.md#submit-the-job).)
33
+
34
+
```azurecli
35
+
az configure --defaults group=$CI_RESOURCE_GROUP workspace=$CI_WORKSPACE
0 commit comments