run matlab using gpus in the cloud
if you do not have a gpu available, you can speed up your matlab® code with one or more high-performance nvidia® gpus in the cloud. working in the cloud requires some initial setup, but using cloud resources can significantly accelerate your code without requiring you to buy and set up your own local gpus.
mathworks® provides several ways of accessing matlab in public clouds, such as amazon® web services (aws®) and microsoft® azure®, that you can configure according to your needs. you can access a single machine in the cloud or, if you have matlab parallel server™, you can scale up to a cluster.
mathworks cloud center
from , you can create and manage cloud resources using your aws account, including accessing a single machine with matlab installed and a matlab parallel server cluster that you can access from any matlab session.
to get started with cloud center, see:
note
when you create your cloud resource, choose a machine with gpus, such as the p2, p3, p4, g3, or g5 instances. instances p2, p3, and p4 have gpus with high performance for general computation. instances g3 and g5 have gpus with high single-precision performance for deep learning, image processing, computer vision, and automated driving simulations.
microsoft azure marketplace
you can deploy matlab and matlab parallel server in the cloud using software plans developed by mathworks for the microsoft azure marketplace.
to get started with microsoft azure marketplace, see:
note
when selecting a virtual machine size, choose a machine with nvidia gpus, such as the ncv3-series, the nc t4_v3-series, and the nd a100 v4-series virtual machines. these virtual machines are designed for compute-intensive workloads.
reference architectures
mathworks provides customizable reference architecture templates for aws and azure in github®. reference architecture templates grant you full control over your cloud resources, including region and network settings that match your existing cloud infrastructure.
to get started with reference architectures, see:
containers
you can also use containers to create software environments on desktop, server, or cloud environments. containers are isolated units of software that contain everything required to run a specific application and are consistent, portable, and lightweight.
to get started with containers, see:
note
by default, a container does not have access to the hardware resources of its host. to grant the container access to the nvidia gpus of the host system:
run the container on a host system with the appropriate nvidia gpu drivers installed.
make the gpus of the host visible to the container by using the
--gpus
flag when you execute thedocker run
command. set this flag toall
to grant the container access to all the gpus of the host machine.
for more information, see .
related topics
- (deep learning toolbox)
- work with remote data