This template is meant to simplify creating new Azure ML based projects, with an easy to configure Azure DevOps CI/CD pipeline.
- Anaconda Python
- Docker installed.
- Azure account.
NOTE You will need to be able to run docker commands without sudo to run this tutorial. Use the following commands to do this.
sudo usermod -aG docker $USER
newgrp docker
The tutorial was developed on an Azure Ubuntu DSVM, which addresses the first three prerequisites.
First either create a new repo from the template, or create a fork of this repo.
You can use this template by selecting Use This Template
to create a new repository based on this project
from the repository homepage.
You may use the .ci/azure-pipeline.yml to configure a CI/CD build for your repostitory. Follow the directions provided within the pipeline.
For details on the prerequistes please see here. With the Azure CLI installed, the following script can be used to create a new pipeline in your organizations Azure DevOps instance.
#!/usr/bin/env bash
organization="<from dev.azure.com/[organization]>"
project="<from dev.azure.com/organization/[project]>"
service_connection="<Name Of New or Existing Service Connection>"
name="<pipeline name>"
repository="[github org]/[github repoistory name]"
az extension add --name azure-devops
az devops configure --defaults organization=https://dev.azure.com/$organization project="$project"
az login
az pipelines create --name $name \
--description '' \
--repository $repository \
--branch master \
--repository-type github \
--yml-path .ci/azure-pipelines-v2.yml \
--service-connection $service_connection
To set up your environment to run this notebook, please follow these steps. They setup the notebook to use Azure seamlessly.
- First either create a new repo from the template, or create a fork of this repo.
- Clone your new repository locally, or on an Azure Data Science Virtual Machine.
git clone https://github.com/[your_github_username_or_org]/[your_project].git
- Enter the local repository:
cd [your_project]
- Copy
project_sample.yml
to a new file,project.yml
, you can fill in the fields now, or use the UI when running from the notebook. This will keep secrets out of the source code, and this file will be ignored by git.cp project_sample.yml project.yml
- Create the Python ai-architecture-template virtual environment using the environment.yml:
conda env create -f environment.yml
- Activate the virtual environment:
The remaining steps should be done in this virtual environment.
source activate ai-architecture-template
- Login to Azure:
You can verify that you are logged in to your subscription by executing the command:
az login
az account show -o table
- If you have more than one Azure subscription, select it:
az account set --subscription <Your Azure Subscription>
- Start the Jupyter notebook server:
jupyter notebook
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
Microsoft AI Github Find other Best Practice projects, and Azure AI Designed patterns in our central repository.