Skip to content

Commit 238186f

Browse files
authored
Update how-to-troubleshoot-environments.md
1 parent 8d8827d commit 238186f

File tree

1 file changed

+103
-25
lines changed

1 file changed

+103
-25
lines changed

articles/machine-learning/how-to-troubleshoot-environments.md

Lines changed: 103 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,10 @@ ml_client.environments.create_or_update(env_docker_image)
296296

297297
### Container registry credentials missing either username or password
298298
<!--issueDescription-->
299-
This can happen when you've specified either a username or a password for your container registry in your environment definition, but not both.
299+
300+
**Potential causes:**
301+
302+
* You've specified either a username or a password for your container registry in your environment definition, but not both
300303

301304
**Affected areas (symptoms):**
302305
* Failure in registering your environment
@@ -306,7 +309,7 @@ This can happen when you've specified either a username or a password for your c
306309

307310
*Applies to: Python SDK azureml V1*
308311

309-
Add the missing username or password to your environment definition to fix the issue.
312+
Add the missing username or password to your environment definition to fix the issue
310313

311314
```
312315
myEnv.docker.base_image_registry.username = "username"
@@ -337,33 +340,108 @@ az ml connection create --file connection.yml --resource-group my-resource-group
337340
* [Azure CLI workspace connections](/cli/azure/ml/connection)
338341

339342
### Multiple credentials for base image registry
340-
- When specifying credentials for a base image registry, you must specify only one set of credentials.
341-
- The following authentication types are currently supported:
342-
- Basic (username/password)
343-
- Registry identity (clientId/resourceId)
344-
- If you're using workspace connections to specify credentials, [delete one of the connections](https://aka.ms/azureml/environment/delete-connection-v1)
345-
- If you've specified credentials directly in your environment definition, choose either username/password or registry identity
346-
to use, and set the other credentials you won't use to `null`
347-
- Specifying credentials in this way is deprecated. It's recommended that you use workspace connections. See
348-
*secrets in base image registry* below
343+
<!--issueDescription-->
344+
345+
**Potential causes:**
346+
347+
* You've specified more than one set of credentials for your base image registry
348+
349+
**Affected areas (symptoms):**
350+
* Failure in registering your environment
351+
<!--/issueDescription-->
352+
353+
**Troubleshooting steps**
354+
355+
*Applies to: Python SDK azureml V1*
356+
357+
If you're using workspace connections, view the connections you have set, and delete whichever one(s) you don't want to use
358+
359+
```
360+
from azureml.core import Workspace
361+
ws = Workspace.from_config()
362+
ws.list_connections()
363+
ws.delete_connection("myConnection2")
364+
```
365+
366+
If you've specified credentials in your environment definition, choose one set of credentials to use, and set all others to null
367+
368+
```
369+
myEnv.docker.base_image_registry.registry_identity = None
370+
```
371+
372+
> [!NOTE]
373+
> * Providing credentials in your environment definition is deprecated. Use workspace connections instead.
374+
375+
**Resources**
376+
* [Delete a workspace connection v1](https://aka.ms/azureml/environment/delete-connection-v1)
377+
* [Python SDK AzureML v1 workspace connections](https://aka.ms/azureml/environment/set-connection-v1)
378+
* [Python SDK AzureML v2 workspace connections](/python/api/azure-ai-ml/azure.ai.ml.entities.workspaceconnection)
379+
* [Azure CLI workspace connections](/cli/azure/ml/connection)
349380

350381
### Secrets in base image registry
351-
- If you specify a base image in your `DockerSection`, you must specify the registry address from which the image will be pulled,
352-
and credentials to authenticate to the registry, if needed.
353-
- Historically, credentials have been specified in the environment definition. However, this method isn't secure and should be
354-
avoided.
355-
- Users should set credentials using workspace connections. For instructions, see [set_connection](https://aka.ms/azureml/environment/set-connection-v1)
382+
<!--issueDescription-->
383+
384+
**Potential causes:**
385+
386+
* You've specified credentials in your environment definition
387+
388+
**Affected areas (symptoms):**
389+
* Failure in registering your environment
390+
<!--/issueDescription-->
391+
392+
**Troubleshooting steps**
393+
394+
Specifying credentials in your environment definition is deprecated. Delete credentials from your environment definition and use workspace connections instead.
395+
396+
*Applies to: Python SDK azureml V1*
397+
398+
Set a workspace connection on your workspace
399+
400+
```
401+
from azureml.core import Workspace
402+
ws = Workspace.from_config()
403+
ws.set_connection("connection1", "ACR", "<URL>", "Basic", "{'Username': '<username>', 'Password': '<password>'}")
404+
```
405+
406+
*Applies to: Azure CLI extensions V1 & V2*
407+
408+
Create a workspace connection from a YAML specification file
409+
410+
```
411+
az ml connection create --file connection.yml --resource-group my-resource-group --workspace-name my-workspace
412+
```
413+
414+
**Resources**
415+
* [Python SDK AzureML v1 workspace connections](https://aka.ms/azureml/environment/set-connection-v1)
416+
* [Python SDK AzureML v2 workspace connections](/python/api/azure-ai-ml/azure.ai.ml.entities.workspaceconnection)
417+
* [Azure CLI workspace connections](/cli/azure/ml/connection)
356418

357419
### Deprecated Docker attribute
358-
- The following `DockerSection` attributes are deprecated:
359-
- `enabled`
360-
- `arguments`
361-
- `shared_volumes`
362-
- `gpu_support`
363-
- Azure Machine Learning now automatically detects and uses NVIDIA Docker extension when available.
364-
- `smh_size`
365-
- Use [DockerConfiguration](https://aka.ms/azureml/environment/docker-configuration-class) instead
366-
- See [DockerSection deprecated variables](https://aka.ms/azureml/environment/docker-section-class)
420+
<!--issueDescription-->
421+
422+
**Potential causes:**
423+
424+
* You've specified Docker attributes in your environment definition that are now deprecated
425+
* The following are deprecated:
426+
* `enabled`
427+
* `arguments`
428+
* `shared_volumes`
429+
* `gpu_support`
430+
* AzureML now automatically detects and uses NVIDIA Docker extension when available
431+
* `smh_size`
432+
433+
**Affected areas (symptoms):**
434+
* Failure in registering your environment
435+
<!--/issueDescription-->
436+
437+
**Troubleshooting steps**
438+
439+
*Applies to: Python SDK azureml V1*
440+
441+
Instead of specifying these attributes in the `DockerSection` of your environment definition, use [DockerConfiguration](https://aka.ms/azureml/environment/docker-configuration-class)
442+
443+
**Resources**
444+
* See `DockerSection` [deprecated variables](https://aka.ms/azureml/environment/docker-section-class)
367445

368446
### Dockerfile length over limit
369447
- The specified Dockerfile can't exceed the maximum Dockerfile size of 100 KB

0 commit comments

Comments
 (0)