Skip to content

Commit 467ad94

Browse files
author
Larry Franks
committed
fixing error
1 parent 9788fdc commit 467ad94

File tree

1 file changed

+37
-15
lines changed

1 file changed

+37
-15
lines changed

articles/machine-learning/how-to-secure-workspace-vnet.md

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,6 @@ Azure Container Registry can be configured to use a private endpoint. Use the fo
203203

204204
1. Find the name of the Azure Container Registry for your workspace, using one of the following methods:
205205

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-
212206
# [Azure CLI](#tab/cli)
213207

214208
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
218212
```
219213
220214
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+
221238
---
222239
223240
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
231248
> [!IMPORTANT]
232249
> When using a compute cluster for image builds, only a CPU SKU is supported.
233250
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)
235263
236264
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:
237265
@@ -247,16 +275,10 @@ Azure Container Registry can be configured to use a private endpoint. Use the fo
247275
248276
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.
249277
250-
# [Azure CLI](#tab/cli)
278+
# [Azure Portal](#tab/portal)
251279
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.
253281
254-
```azurecli
255-
az ml workspace update \
256-
-n myworkspace \
257-
-g myresourcegroup \
258-
-i mycomputecluster
259-
```
260282
---
261283
262284
> [!TIP]

0 commit comments

Comments
 (0)