Easy way to train a model on demand.

Patric ögren 20 Reputation points
2025-05-09T13:54:06.8666667+00:00

I am currently playing around with Google Colab to train a machine learning model, where I can easily choose different GPUs, like an A100, and pay as I go by first depositing a set amount of money. This way, I know I cannot spend more than I can afford. It is also simple to start working with a Colab notebook directly in the browser, and it requires minimal setup time.

Since I have Azure startup program credits, I would like to do something similar with Azure. However, when I try to start virtual machines on Azure, I find the many options overwhelming with unselectable fields and unclear path of how to achieve my very basic situation, I can not find fields with the right GPU like a A100 or similar and a pay-as-you-go option. I usually only need the machines to run for a few hours or days, and then I want them to terminate.

Could you please provide a guide on how to do this in a simple way, so I do not risk spending more money than I can afford. I think many people would benefit from a guide like this right now.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,035 questions
{count} votes

Accepted answer
  1. Alex Burlachenko 10,255 Reputation points
    2025-05-14T12:18:33.9033333+00:00

    Hi Patric,

    Thank you for sharing your question on the Q&A portal! I totally understand how confusing it can be to navigate all the options in Azure, especially when you’re just getting started. Let me try to explain how you can set up a virtual machine with the right GPU and pay-as-you-go billing in a simple way.

    First, Azure does offer virtual machines with powerful GPUs like the NVIDIA A100, and you can absolutely use them for short-term training jobs without overspending. To find these options, you’ll want to look for the "NCv3" or "NDv2" series virtual machines, as these include the A100 GPU. You can check the full list of available GPU VMs in the Microsoft documentation.

    When creating a VM, make sure to select "Pay-As-You-Go" as the pricing option—this way, you’ll only be charged for the time the machine is running. To avoid unexpected costs, you can also set up a spending limit in the Azure Cost Management section. Here’s a helpful guide on how to manage costs.

    For quick setup without dealing with too many settings, you might want to try Azure Machine Learning notebooks instead of manually configuring a VM. It’s similar to Google Colab and lets you choose GPU-backed compute on demand. The service automatically shuts down resources when you’re done, so you don’t have to worry about forgetting to stop a VM. You can learn more about it here.

    If you prefer sticking with virtual machines, another tip is to use the "Spot Instances" option, which lets you run VMs at a much lower cost when Azure has spare capacity. Just keep in mind they can be interrupted if capacity is needed elsewhere. More details on Spot VMs are available here.

    I hope this helps

    Best regards,
    Alex
    P.S. If my answer help to you, please Accept my answer
    PPS That is my Answer and not a Comment
    https://ctrlaltdel.blog/
    
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Nikhil Duserla 7,935 Reputation points Microsoft External Staff Moderator
    2025-05-09T15:41:53.6266667+00:00

    Hello @Patric ögren,

    To help manage costs and resources, you can schedule the termination of Azure GPU virtual machines after a few hours or days. This can be done using Azure Automation’s Start/Stop VMs solution. Additionally, you can configure auto-shutdown settings directly in the Azure portal for each virtual machine. Auto-shutdown a virtual machine- https://learn.microsoft.com/en-us/azure/virtual-machines/auto-shutdown-vm?tabs=portal

    Additionally, monitor your usage and explore cost-optimization strategies, such as selecting the right VM sizes and types based on your workload needs. also estimate cost of the VM before deploying by reaching out this link- https://azure.microsoft.com/en-us/pricing/calculator/?msockid=299efeeb2e3b609b1974eb3e2f446102

    To request GPU VM's please follow below steps-

    Navigate to azure portal>>VM>>Create New VM>>VM Name>>Region: select Region>>Availability options: No infrastructure redundancy required>>Select Image>>Size: Click on See all sizes>>Insufficient quota family limit>>Select your required GPU and request quota.

    User's image

    If you have any further queries, do let us know.

    0 comments No comments

  2. Patric ögren 20 Reputation points
    2025-06-18T14:33:13.85+00:00

    thank you very much

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.