1
1
# !/usr/bin/env pwsh
2
2
3
- Write-Host " Starting postprovisioning..."
3
+ Write-Host " --- ☑️ 1. Starting postprovisioning ---"
4
+
5
+ # -----------------------------------------------------------
6
+ # Retrieve service names, resource group name, and other values from environment variables
4
7
5
8
# Retrieve service names, resource group name, and other values from environment variables
6
9
$resourceGroupName = $env: AZURE_RESOURCE_GROUP
@@ -23,25 +26,24 @@ Write-Host "azureSearchEndpoint: $azureSearchEndpoint"
23
26
24
27
# Ensure all required environment variables are set
25
28
if ([string ]::IsNullOrEmpty($resourceGroupName ) -or [string ]::IsNullOrEmpty($openAiService ) -or [string ]::IsNullOrEmpty($subscriptionId )) {
26
- Write-Host " One or more required environment variables are not set."
29
+ Write-Host " 🅇 One or more required environment variables are not set."
27
30
Write-Host " Ensure that AZURE_RESOURCE_GROUP, AZURE_OPENAI_NAME, AZURE_SUBSCRIPTION_ID are set."
28
31
exit 1
29
32
}
30
33
31
- # Set additional environment variables expected by app
32
- # --- Removed these since they are already set in azd env refresh ---
33
- # azd env set AZURE_OPENAI_API_VERSION $AZURE_OPENAI_API_VERSION # 2023-03-15-preview
34
- # azd env set AZURE_OPENAI_CHAT_DEPLOYMENT AZURE_OPENAI_API_VERSION # gpt-35-turbo
35
- # azd env set AZURE_SEARCH_ENDPOINT $AZURE_SEARCH_ENDPOINT
36
-
37
34
# Output environment variables to .env file using azd env get-values
38
35
azd env get-values > .env
39
- Write-Host " Script execution completed successfully."
36
+ # Write-Host "--- ✅ 2. Set environment variables ---"
37
+
38
+ # -----------------------------------------------------------
39
+ # Setup to run notebooks
40
+ # python -m pip install -r ./src/api/requirements.txt > $null
41
+ # Write-Host "---- ✅ 3. Installed required dependencies ---"
40
42
41
- Write-Host ' Installing dependencies from "requirements.txt"'
42
- python - m pip install - r ./ src/ api/ requirements.txt > $null
43
+ # -----------------------------------------------------------
44
+ # Run notebooks to populate data
45
+ # jupyter nbconvert --execute --to python --ExecutePreprocessor.timeout=-1 data/customer_info/create-cosmos-db.ipynb > $null
46
+ # jupyter nbconvert --execute --to python --ExecutePreprocessor.timeout=-1 data/product_info/create-azure-search.ipynb > $null
47
+ # Write-Host "---- ✅ 4. Completed populating data ---"
43
48
44
- # populate data
45
- Write-Host " Populating data ...."
46
- jupyter nbconvert -- execute -- to python -- ExecutePreprocessor.timeout= -1 data / customer_info/ create- cosmos- db.ipynb > $null
47
- jupyter nbconvert -- execute -- to python -- ExecutePreprocessor.timeout= -1 data / product_info/ create- azure- search.ipynb > $null
49
+ Write-Host " --- ✅ Completed postprovisioning ---"
0 commit comments