我想遵循 this 教程,解释如何在 Azure 上运行 ollama。本教程使用
Standard_NC6s_v3
作为节点池。根据 cloudprice.net,有一些更便宜的替代品。但在 NC6s_v3
和其他变体中,我得到错误 NotAvailableForSubscription
。因为我只有一个学生帐户。是否有任何其他启用了 GPU 的虚拟机大小可供我在订阅中使用?它应该有一个不错的 GPU 和大约 90GB 的 RAM。我知道数量很多,但我只想运行几分钟,直到推理完成。出于测试目的,使用更少 GB RAM 的较小版本也很好。在那里我可以创建一个设置脚本,我可以在每次启动时在 terraform 中运行。
当我想运行以下脚本时:
resource "azurerm_virtual_machine" "this" {
name = "gpu-vm"
location = azurerm_resource_group.this.location
resource_group_name = azurerm_resource_group.this.name
network_interface_ids = [azurerm_network_interface.this.id]
vm_size = "Standard_NC6s_v3"
storage_os_disk {
name = "osdisk"
caching = "ReadWrite"
create_option = "FromImage"
managed_disk_type = "Standard_LRS"
}
storage_image_reference {
publisher = "Canonical"
offer = "UbuntuServer"
sku = "18.04-LTS"
version = "latest"
}
os_profile {
computer_name = "gpu-vm"
admin_username = "adminuser"
admin_password = "Password1234!"
}
os_profile_linux_config {
disable_password_authentication = false
}
tags = {
environment = "production"
}
}
我得到:
╷
│ Error: creating/updating Virtual Machine (Subscription: "..."
│ Resource Group Name: "gpu-rg"
│ Virtual Machine Name: "gpu-vm"): performing CreateOrUpdate: unexpected status 409 (409 Conflict) with error: OperationNotAllowed: Operation could not be completed as it results in exceeding approved standardNCSv3Family Cores quota. Additional details - Deployment Model: Resource Manager, Location: eastus, Current Limit: 0, Current Usage: 0, Additional Required: 6, (Minimum) New Limit Required: 6. Setup Alerts when Quota reaches threshold. Learn more at https://aka.ms/quotamonitoringalerting . Submit a request for Quota increase at https://aka.ms/ProdportalCRP/#blade/Microsoft_Azure_Capacity/UsageAndQuota.ReactView/Parameters/%7B%22subscriptionId%...command%22:%22openQuotaApprovalBlade%22,%22quotas%22:[%7B%22location%22:%22eastus%22,%22providerId%22:%22Microsoft.Compute%22,%22resourceName%22:%22standardNCSv3Family%22,%22quotaRequest%22:%7B%22properties%22:%7B%22limit%22:6,%22unit%22:%22Count%22,%22name%22:%7B%22value%22:%22standardNCSv3Family%22%7D%7D%7D%7D]%7D by specifying parameters listed in the ‘Details’ section for deployment to succeed. Please read more about quota limits at https://docs.microsoft.com/en-us/azure/azure-supportability/per-vm-quota-requests
│
│ with azurerm_virtual_machine.this,
│ on nodepool.tf line 19, in resource "azurerm_virtual_machine" "this":
│ 19: resource "azurerm_virtual_machine" "this" {
Azure 免费或学生相关订阅会有配额限制,而像
NC6s_v3
这样的高端 GPU 是有点昂贵的资源。
Azure 开发可能会限制对这些帐户的访问 并根据其他人的业务需求为其提供可用性。
是否有任何其他启用了 GPU 的虚拟机大小可供我在订阅中使用?
是的,这里的MSDoc中列出了虚拟机大小及其每个系列类型的详细视图。您可以通过存储优化、内存优化、计算优化以及 GPU 加速等来检查。
N 系列虚拟机是 GPU 节点池优化的虚拟机。请参阅 Microsoft 问答 了解更多类似信息。
如果使用更高的 GPU 节点池时问题仍然存在,那么您可以在特定订阅下提出
New Quota Request
,以使用更高功能的 CPU 或 GPU。
我在我的环境中尝试了与您相同的代码,没有进行任何更改,它向我显示了以下内容
terraform plan
以继续进行,没有任何Not available
错误,因为我有一个即用即付的企业帐户。