Skip to content

Latest commit

 

History

History
96 lines (75 loc) · 2.58 KB

File metadata and controls

96 lines (75 loc) · 2.58 KB
author anthonychu
ms.service azure-container-apps
ms.topic include
ms.date 05/08/2024
ms.author antchu

Prerequisites

Create Azure resources

The sample app in this quickstart uses an LLM from Azure OpenAI. It also uses Azure Container Apps sessions to run code generated by the LLM.

  1. Update the Azure CLI to the latest version.

     az upgrade
  2. Remove the Azure Container Apps extension if it's already installed and install a preview version the Azure Container Apps extension containing commands for sessions:

    az extension remove --name containerapp
    az extension add \
        --name containerapp \
        --allow-preview true -y
  3. Sign in to Azure:

    az login
  4. Set the variables used in this quickstart:

    RESOURCE_GROUP_NAME=aca-sessions-tutorial
    AZURE_OPENAI_LOCATION=swedencentral
    AZURE_OPENAI_NAME=<UNIQUE_OPEN_AI_NAME>
    SESSION_POOL_LOCATION=eastasia
    SESSION_POOL_NAME=code-interpreter-pool

    Replace <UNIQUE_OPEN_AI_NAME> with a unique name to create your Azure OpenAI account.

  5. Create a resource group:

    az group create --name $RESOURCE_GROUP_NAME --location $SESSION_POOL_LOCATION
  6. Create an Azure OpenAI account:

    az cognitiveservices account create \
        --name $AZURE_OPENAI_NAME \
        --resource-group $RESOURCE_GROUP_NAME \
        --location $AZURE_OPENAI_LOCATION \
        --kind OpenAI \
        --sku s0 \
        --custom-domain $AZURE_OPENAI_NAME
  7. Create a GPT 3.5 Turbo model deployment named gpt-35-turbo in the Azure OpenAI account:

    az cognitiveservices account deployment create \
        --resource-group $RESOURCE_GROUP_NAME \
        --name $AZURE_OPENAI_NAME \
        --deployment-name gpt-35-turbo \
        --model-name gpt-35-turbo \
        --model-version "1106" \
        --model-format OpenAI \
        --sku-capacity "100" \
        --sku-name "Standard"
  8. Create a code interpreter session pool:

    az containerapp sessionpool create \
        --name $SESSION_POOL_NAME \
        --resource-group $RESOURCE_GROUP_NAME \
        --location $SESSION_POOL_LOCATION \
        --max-sessions 100 \
        --container-type PythonLTS \
        --cooldown-period 300