Skip to content

Commit 1649ceb

Browse files
Merge pull request #327 from microsoft/fix/quota_check_script_update_and_download_cli
fix: updated quota check script
2 parents 1d42725 + 6fa8315 commit 1649ceb

File tree

6 files changed

+192
-219
lines changed

6 files changed

+192
-219
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
]
1717
}
1818
},
19-
"postStartCommand": "git pull origin main && python3 -m pip install -r infra/scripts/index_scripts/requirements.txt",
19+
"postStartCommand": "git pull origin main && python3 -m pip install -r infra/scripts/index_scripts/requirements.txt && curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash",
2020
"remoteUser": "vscode",
2121
"hostRequirements": {
2222
"memory": "4gb"

docs/Images/git_bash.png

29.3 KB
Loading

docs/Images/quota-check-output.png

12.6 KB
Loading

docs/quota_check.md

Lines changed: 60 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,86 @@
11
## Check Quota Availability Before Deployment
22

3-
Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
4-
Use one of the following scripts based on your needs:
3+
Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
54

6-
- **`quota_check_params.sh`** → If you **know the model and capacity** required.
7-
- **`quota_check_all_regions.sh`** → If you **want to check available capacity across all regions** for supported models.
5+
### 📌 Default Models & Capacities:
6+
```
7+
gpt-4o:30, gpt-4o-mini:30, gpt-4:30, text-embedding-ada-002:80
8+
```
9+
### 📌 Default Regions:
10+
```
11+
eastus, uksouth, eastus2, northcentralus, swedencentral, westus, westus2, southcentralus, canadacentral
12+
```
13+
### Usage Scenarios:
14+
- No parameters passed → Default models and capacities will be checked in default regions.
15+
- Only model(s) provided → The script will check for those models in the default regions.
16+
- Only region(s) provided → The script will check default models in the specified regions.
17+
- Both models and regions provided → The script will check those models in the specified regions.
18+
19+
### **Input Formats**
20+
✔️ Run without parameters to check default models & regions:
21+
```
22+
./quota_check_params.sh
23+
```
24+
✔️ Model name and required capacity in the format:
25+
```
26+
./quota_check_params.sh gpt-4o:30
27+
```
28+
✔️ Multiple models can be passed, separated by commas:
29+
```
30+
./quota_check_params.sh gpt-4o:30,text-embedding-ada-002:80
31+
```
32+
✔️ Passing Both models and regions:
33+
```
34+
./quota_check_params.sh gpt-4o:30 eastus,westus2
35+
```
36+
✔️ Check default models in specific regions:
37+
```
38+
./quota_check_params.sh "" eastus,westus2
39+
```
40+
41+
### **Sample Output**
42+
The final table lists regions with available quota. You can select any of these regions for deployment.
43+
44+
![quota-check-ouput](Images/quota-check-output.png)
845

946
---
10-
## **If using Azure Portal and Cloud Shell**
47+
### **If using Azure Portal and Cloud Shell**
1148

1249
1. Navigate to the [Azure Portal](https://portal.azure.com).
1350
2. Click on **Azure Cloud Shell** in the top right navigation menu.
1451
3. Run the appropriate command based on your requirement:
1552

16-
**To check quota for a specific model and capacity:**
53+
**To check quota for the deployment**
1754

1855
```sh
1956
curl -L -o quota_check_params.sh "https://raw.githubusercontent.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator/main/infra/scripts/quota_check_params.sh"
2057
chmod +x quota_check_params.sh
21-
./quota_check_params.sh <model_name:capacity> [<model_region>] (e.g., gpt-4o-mini:30,text-embedding-ada-002:20 eastus)
58+
./quota_check_params.sh
2259
```
23-
24-
**To check available quota across all regions for supported models:**
25-
26-
```sh
27-
curl -L -o quota_check_all_regions.sh "https://raw.githubusercontent.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator/main/infra/scripts/quota_check_all_regions.sh"
28-
chmod +x quota_check_all_regions.sh
29-
./quota_check_all_regions.sh
60+
- Refer to [Input Formats](#input-formats) for detailed commands.
61+
62+
### **If using VS Code or Codespaces**
63+
1. Open the terminal in VS Code or Codespaces.
64+
2. If you're using VS Code, click the dropdown on the right side of the terminal window, and select `Git Bash`.
65+
![git_bash](images/git_bash.png)
66+
3. Navigate to the `scripts` folder where the script files are located and make the script as executable:
67+
```sh
68+
cd infra/scripts
69+
chmod +x quota_check_params.sh
3070
```
31-
32-
## **If using VS Code or Codespaces**
33-
34-
1. Run the appropriate script based on your requirement:
71+
4. Run the appropriate script based on your requirement:
3572
36-
**To check quota for a specific model and capacity:**
73+
**To check quota for the deployment**
3774
3875
```sh
39-
./quota_check_params.sh <model_name:capacity> [<model_region>] (e.g., gpt-4o-mini:30,text-embedding-ada-002:20 eastus)
76+
./quota_check_params.sh
4077
```
78+
- Refer to [Input Formats](#input-formats) for detailed commands.
4179
42-
**To check available quota across all regions for supported models:**
43-
44-
```sh
45-
./quota_check_all_regions.sh
46-
```
47-
2. If you see the error `_bash: az: command not found_`, install Azure CLI:
80+
5. If you see the error `_bash: az: command not found_`, install Azure CLI:
4881
4982
```sh
5083
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
5184
az login
5285
```
53-
3. Rerun the script after installing Azure CLI.
54-
55-
**Parameters**
56-
- `<model_name:capacity>`: The name and required capacity for each model, in the format model_name:capacity (**e.g., gpt-4o-mini:30,text-embedding-ada-002:20**).
57-
- `[<model_region>] (optional)`: The Azure region to check first. If not provided, all supported regions will be checked (**e.g., eastus**).
86+
6. Rerun the script after installing Azure CLI.

infra/scripts/quota_check_all_regions.sh

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)