Fix 'conda command not found' in AzureML example Creation scripts #3321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue with 'conda command not found' in recent azureml compute instance setup scripts.
The underlying reason why we run in this error is probably that before the creation scripts are ran, conda is installed, but bashrc is not ran, nor is bash restarted. This PR adds manually the PATH to conda to the scripts by running
source /anaconda/etc/profile.d/conda.sh
before the initial conda commands.As this script is referenced in the documentation, this change will also update the documentation on creation scripts on azureml Compute instances. https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/machine-learning/how-to-customize-compute-instance.md
Currently following the steps on the documentation gives you the above mentioned error.
Fixes #3291
Checklist