Our development environment makes use of 3 resources:
- Azure AI Studio - accessed via browser.
- Azure AI CLI - accessed via terminal.
- Azure AI SDK - accessed via code.
To setup your development environment, you have 3 options:
- Prebuilt, with GitHub Codespaces - recommended approach.
- Prebuilt, with Docker Desktop - for local development.
- Manually, on local device - tradeoff complexity for control.
[!IMPORTANT
The Azure AI Studio preview and related Azure AI SDK and Azure AI CLI are likely to evolve quickly to reflect changes and updates. We strongly recommend using the pre-built development environment options to minimize your effort required to setup and maintain your own local environment to be consistent with thesev changes.
For completeness, we've documented all three options below.
Note
This is the recommended option. Minimize your setup effort and maximize your productivity by using a prebuilt development environment.
The repository is instrumented to use a dev container that includes all the necessary tools and packages required to build the copilot.
-
To get started, click the button below to launch GitHub Codespaces directly in your browser.
Alternatively, you can launch GitHub Codespaces by clicking the "Code" button in the repository UI, selecting the "Codespaces" tab - and then creating a new codespace. Previously created codespaces will be listed if active or available for resume.
-
The first time you launch the codespace, you will see a new tab open with something like this indicating that the Codespace (dev container) is being built. Clicking the
Show Logs
button in the output console will produce the detailed output shown below. -
Once the build completes, you should see the tab refresh to show a Visual Studio Code editor in the browser, as shown below. The blue bar at the bottom left of the screen should show you the name of the running Github Codespaces instance.
If you refresh the repository page and view that 'Codespaces' tab again, you should see the same name show up as an active codespace for that repository.
🟩 Congratulations! You're Codespaces is ready!
Note
This option is recommended if you prefer to work locally on your device. Continue getting the benefits of a prebuilt development environment using Docker Desktop as your container host.
-
Install Docker Desktop. Follow the instructions here to install Docker Desktop on your device.
-
Clone this repository to your local device as usual, and open the repository in Visual Studio Code. Then follow the instructions here to open the repository in a dev container hosted in Docker Desktop. It will take a few minutes to build the container, but the end result will look like this. Note that the blue bar at the bottom left of the screen now indicates you are running in a
Dev Container
rather than a named GitHub Codespace.🟩 Congratulations! You're local Dev Container is ready!
Note
This option is provided only for completeness. It is best for advanced users who are willing to tradeoff complexity (in maintenance) for control (in local environment setup). The user is accountable for making related updates when the Azure AI Studio, SDK or CLI dependencies change.
To minimize disruption to other projects on your local device, we recommend using a managed virtual environment (like venv or conda) to install the required Python version and dependencies for this project.
-
Install and activate a virtual environment. Follow the guidance in the How to get started with the Azure AI SDK documentation to install your preferred virtual environment (venv or conda) - and activate it. You need
Python 3.10 or higher
to use the Azure AI SDK. -
Install the Azure AI SDK. Use the
requirements.txt
file in this repo and install dependencies as follows:pip install -r requirements.txt
-
Install the Azure AI CLI. Use the following command if your local environment on Ubuntu. To install the CLI on Windows and MacOS, follow the instructions here instead.
curl -sL https://aka.ms/InstallAzureAICLIDeb | sudo bash
🟩 Congratulations! You're local environment is ready!
We assume you've completed one of the three options above to setup your development environment. Now, let's validate the setup by checking if the Azure AI CLI is installed.
ai help
If setup correctly, you should see the help screen for the Azure AI CLI. as shown below. Hit Esc
to exit the help screen and get back to your commandline prompt.
🟩 Congratulations! You've validated your dev environment!
We've setup and validated our development environment. Next, we'll create our Azure AI project and provision resources to build our copilot solution.