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-secure-workspace-vnet.md
+37-15Lines changed: 37 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,12 +203,6 @@ Azure Container Registry can be configured to use a private endpoint. Use the fo
203
203
204
204
1. Find the name of the Azure Container Registry for your workspace, using one of the following methods:
205
205
206
-
# [Azure portal](#tab/portal)
207
-
208
-
From the overview section of your workspace, the __Registry__ value links to the Azure Container Registry.
209
-
210
-
:::image type="content" source="./media/how-to-enable-virtual-network/azure-machine-learning-container-registry.png" alt-text="Azure Container Registry for the workspace" border="true":::
211
-
212
206
# [Azure CLI](#tab/cli)
213
207
214
208
If you've [installed the Machine Learning extension v2 for Azure CLI](how-to-configure-cli.md), you can use the `az ml workspace show` command to show the workspace information.
@@ -218,6 +212,29 @@ Azure Container Registry can be configured to use a private endpoint. Use the fo
218
212
```
219
213
220
214
This command returns a value similar to `"/subscriptions/{GUID}/resourceGroups/{resourcegroupname}/providers/Microsoft.ContainerRegistry/registries/{ACRname}"`. The last part of the string is the name of the Azure Container Registry for the workspace.
215
+
216
+
# [Python SDK](#tab/python)
217
+
218
+
The following code snippet demonstrates how to get the container registry information using the [Azure Machine Learning SDK](/python/api/overview/azure/ml/):
219
+
220
+
```python
221
+
from azureml.core import Workspace
222
+
# Load workspace from an existing config file
223
+
ws = Workspace.from_config()
224
+
# Get details on the workspace
225
+
details = ws.get_details()
226
+
# Print container registry information
227
+
print(details['containerRegistry'])
228
+
```
229
+
230
+
This code returns a value similar to `"/subscriptions/{GUID}/resourceGroups/{resourcegroupname}/providers/Microsoft.ContainerRegistry/registries/{ACRname}"`. The last part of the string is the name of the Azure Container Registry for the workspace.
231
+
232
+
# [Azure portal](#tab/portal)
233
+
234
+
From the overview section of your workspace, the __Registry__ value links to the Azure Container Registry.
235
+
236
+
:::image type="content" source="./media/how-to-enable-virtual-network/azure-machine-learning-container-registry.png" alt-text="Azure Container Registry for the workspace" border="true":::
237
+
221
238
---
222
239
223
240
1. Limit access to your virtual network using the steps in [Connect privately to an Azure Container Registry](../container-registry/container-registry-private-link.md). When adding the virtual network, select the virtual network and subnet for your Azure Machine Learning resources.
@@ -231,7 +248,18 @@ Azure Container Registry can be configured to use a private endpoint. Use the fo
231
248
> [!IMPORTANT]
232
249
> When using a compute cluster for image builds, only a CPU SKU is supported.
233
250
234
-
# [Python SDK](#tab/sdk)
251
+
# [Azure CLI](#tab/cli)
252
+
253
+
If you've [installed the Machine Learning extension v2 for Azure CLI](how-to-configure-cli.md), you can use the `az ml workspace update` command to set a build compute. In the following command, replace `myworkspace` with your workspace name, `myresourcegroup` with the resource group that contains the workspace, and `mycomputecluster` with the compute cluster name:
254
+
255
+
```azurecli
256
+
az ml workspace update \
257
+
-n myworkspace \
258
+
-g myresourcegroup \
259
+
-i mycomputecluster
260
+
```
261
+
262
+
# [Python SDK](#tab/python)
235
263
236
264
The following code snippet demonstrates how to update the workspace to set a build compute using the [Azure Machine Learning SDK](/python/api/overview/azure/ml/). Replace `mycomputecluster` with the name of the cluster to use:
237
265
@@ -247,16 +275,10 @@ Azure Container Registry can be configured to use a private endpoint. Use the fo
247
275
248
276
For more information, see the [update()](/python/api/azureml-core/azureml.core.workspace.workspace#update-friendly-name-none--description-none--tags-none--image-build-compute-none--enable-data-actions-none-) method reference.
249
277
250
-
# [Azure CLI](#tab/cli)
278
+
# [Azure Portal](#tab/portal)
251
279
252
-
If you've [installed the Machine Learning extension v2 for Azure CLI](how-to-configure-cli.md), you can use the `az ml workspace update` command to set a build compute. In the following command, replace `myworkspace` with your workspace name, `myresourcegroup` with the resource group that contains the workspace, and `mycomputecluster` with the compute cluster name:
280
+
Currently there isn't a way to set the image build compute from the Azure portal.
0 commit comments