Setting Up Azure AI Beginner
This lesson guides you through creating an Azure subscription, setting up resource groups, and provisioning AI services. By the end, you will have a fully configured Azure environment ready for AI development.
Prerequisites
- A Microsoft account (Outlook, Hotmail, or organizational account)
- A credit card for billing (Azure offers $200 free credits for new accounts)
- Python 3.8+ installed locally
Step 1: Create an Azure Account
-
Visit the Azure Portal
Go to portal.azure.com and sign in with your Microsoft account.
-
Start the free trial
New users receive $200 in free credits for 30 days, plus 12 months of free services. Click "Start free" to begin.
Step 2: Install Azure CLI
Terminal
# Install Azure CLI # Windows (PowerShell) winget install Microsoft.AzureCLI # macOS brew install azure-cli # Linux (Ubuntu/Debian) curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # Login to Azure az login
Step 3: Create a Resource Group
Resource groups are logical containers for Azure resources. Create one for your AI projects:
Terminal
# Create a resource group az group create --name ai-school-rg --location eastus # Verify creation az group show --name ai-school-rg
Step 4: Provision AI Services
Terminal
# Create an Azure AI Services multi-service resource az cognitiveservices account create \ --name ai-school-services \ --resource-group ai-school-rg \ --kind CognitiveServices \ --sku S0 \ --location eastus \ --yes # Get the API key az cognitiveservices account keys list \ --name ai-school-services \ --resource-group ai-school-rg # Get the endpoint az cognitiveservices account show \ --name ai-school-services \ --resource-group ai-school-rg \ --query "properties.endpoint"
Step 5: Install Python SDKs
Terminal
# Install Azure AI SDKs pip install azure-ai-ml azure-identity pip install openai # For Azure OpenAI pip install azure-cognitiveservices-vision-computervision pip install azure-ai-textanalytics pip install azure-cognitiveservices-speech
Step 6: Verify Setup
Python
from azure.identity import DefaultAzureCredential from azure.ai.ml import MLClient # Authenticate using default credentials credential = DefaultAzureCredential() # Verify connection to Azure print("Azure authentication successful!") print("Your Azure AI environment is ready.")
Tip: Use Azure Key Vault to store API keys and secrets securely. Never hardcode credentials in your application code. The
DefaultAzureCredential class automatically handles authentication in both local development and production environments.
Setup Complete!
Your Azure AI environment is configured. In the next lesson, you will learn about Azure OpenAI Service and how to deploy GPT, DALL-E, and Whisper models.
Next: Azure OpenAI →
Lilly Tech Systems