This repository shows how to automate the process of running MATLAB® on Microsoft® Azure® using a virtual machine, and connecting to it using the Remote Desktop Protocol (RDP) or SSH. The automation uses an Azure Resource Manager (ARM) template. The template is a JSON file that defines the resources needed to run MATLAB on Azure. For information about the architecture of this solution, see Learn about Architecture.
You need:
- A MATLAB® license. For more information, see License Requirements for MATLAB on Cloud Platforms.
- A MathWorks® account.
- An Azure account.
You are responsible for the cost of the Azure services used when you create cloud resources using this guide. Resource settings, such as instance type, affect the cost of deployment. For cost estimates, see the pricing pages for each Azure service you will be using. Prices are subject to change.
To view instructions for deploying the MATLAB reference architecture, select a MATLAB release:
Linux | Windows |
---|---|
R2024a | R2024a |
R2023b | R2023b |
R2023a | R2023a |
R2022b | R2022b |
R2022a | R2022a |
R2021b | R2021b |
R2021a | R2021a |
R2020b | R2020b |
R2020a | |
R2019b | |
R2019a_and_older |
Deploying this reference architecture will create several resources in your resource group.
Deploying this reference architecture sets up a single Azure virtual machine containing MATLAB, a network interface with a public IP address to connect to the virtual machine, a network security group that controls network traffic, and a virtual network for communication between resources.
The VM image contains the following:
- MATLAB, Simulink, toolboxes, and support for GPUs.
- Add-ons: several pretrained deep neural networks for classification, feature extraction, and transfer learning with Deep Learning Toolbox™, including GoogLeNet, ResNet-50, and NASNet-Large.
Resource Name | Resource Name in Azure | Number of Resources | Description |
---|---|---|---|
Virtual Machine | matlab-vm |
1 | The virtual machine instance with pre-installed desktop MATLAB. |
Network interface | matlab-nic |
1 | Enables the virtual machine to communicate with internet, Azure, and on-premises resources. |
Public IP address | matlab-publicIP |
1 | Public IP address to connect to the virtual machine running MATLAB. |
Network security group | matlab-rdp-nsg |
1 | Allows or denies traffic to and from sources and destinations. |
Virtual network | matlab-vnet |
1 | Enables resources to communicate with each other. |
Disk | matlab-vm-disk-<unique id> |
1 | The disk attached to the VM. |
Image | matlab-base-image |
1 | The original image used to create the VM. |
The links in Deployment Steps launch instances based on the latest MathWorks machine images for at least the four most recent MATLAB releases. MATLAB releases occur twice each year.
For each MATLAB release, MathWorks periodically replaces the corresponding image with a newer image that includes the latest MATLAB updates and important security updates of the base OS image.
All your files and changes are stored locally on the virtual machine. They persist until you either terminate the virtual machine instance or delete the resource group. Stopping the instance does not destroy the data on the instance. If you want your changes to persist before you terminate an instance, you need to:
- copy your files to another location, or
- create an image of the virtual machine.
To minimize costs, you might want to shut down the instance when you are not using it. Any files or changes you make to the virtual machine persist when you shut down the instance and will be there when you restart it.
You can customize an image by launching the reference architecture, applying changes to the virtual machine, and then saving an image of that virtual machine using the Azure Portal. For more information, see Create an image of a VM in the portal in the Azure documentation.
The VM image uses MathWorks Hosted License Manager by default. For information on using other license managers, see MATLAB Licensing in the Cloud.
You need to edit the template and replace the appropriate sections with your own virtual network and subnet resource IDs.
To request assistance or additional features, contact MathWorks Technical Support.
Copyright 2018-2024 The MathWorks, Inc.