Skip to content

2.5 Setup Local Environment

The previous steps completed the setup of our Azure AI infrastructure (resources). Now it's time to setup our development environment to talk to our Azure backend.


1. Launch GitHub Codespaces

If you had not previously done so, complete the Getting Started steps now.

  1. Fork this repository to your personal GitHub profile.
  2. Open the fork in a new browser tab.
  3. Click on the blue "Code" button and select Codespaces
  4. Click on the Create Codespaces on Main button

You should see GitHub Codespaces launch in a new browser tab.

  • It will take a few minutes to complete loading.
  • You should see a Visual Studio Code IDE in the browser
  • When ready, you should see a VS Code terminal with active prompt.

2. Verify Azure CLI Installed

The repository is configured with a devcontainer that has all necessary dependencies pre-installed. Let's verify the az (Azure Developer CLI) was installed.

1
az version

3. Authenticate with Azure CLI

Log into your Azure subscription from the VS Code terminal in GitHub Codespaces using the following command, and follow the prompts to complete the workflow.

1
az login --use-device-code

If you have a multi-tenancy account, you can set the default tenant when logging in as follows, where <TENANTID> is replaced with the relevant identifier.

1
az login --use-device-code --tenant <TENANTID>

4. Verify Python Packages

The codebase is set up with a requirements.txt file that has all the necesary Python package dependencies listed. These are auto-installed into the devcontainer at launch. Use pip list | grep <KEYWORD> to verify if specific packages were installed.

For instance use this command to list azure packages installed and verify they match the ones listed in requirements (e.g., look for azure-ai-projects, azure-ai-inference, azure-ai-identity, azure-search-documents, azure-core, azure-ai-evaluation)

1
pip list | grep azure