MATLAB Deep Learning Container on Docker Hub
Speed up your deep learning applications by training neural networks in the MATLAB® Deep Learning Container available on Docker Hub, designed to take full advantage of high-performance NVIDIA® GPUs. The MATLAB Deep Learning Container provides a simple and flexible solution to use MATLAB for deep learning workflows in cloud environments such as AWS® or Microsoft® Azure®. For more information on containers, see Get Started with Containers.
The MATLAB Deep Learning Container includes:
An Ubuntu® base image.
MATLAB and the following toolboxes:
Computer Vision Toolbox™
Deep Learning Toolbox™
Image Processing Toolbox™
Parallel Computing Toolbox™
Signal Processing Toolbox™
Statistics and Machine Learning Toolbox™
Text Analytics Toolbox™
Several pretrained deep neural networks. For more information, see Pretrained Deep Neural Networks (Deep Learning Toolbox).
Support packages useful for deep learning workflows.
GPU drivers necessary to use NVIDIA GPUs in the container.
Software to enable interaction with the MATLAB desktop.
You can import networks and network architectures into the container from TensorFlow™-Keras and Caffe, with or without layer weights. You can also convert trained networks to the Open Neural Network Exchange (ONNX) model format. For more information, see Import and Export Neural Networks (Deep Learning Toolbox) and ONNX Converter.
To use the MATLAB Deep Learning Container, you need:
A host machine with Docker® 19.03 or newer installed.
A MATLAB license that is:
Valid for all the MathWorks® products installed in the container. You can get a trial license for products in the MATLAB Deep Learning Container at MATLAB Trial for Deep Learning on the Cloud.
Linked to a MathWorks Account.
Configured for cloud use. Individual and Campus-Wide licenses are already configured. For other license types, contact your license administrator. You can identify your license type and administrator by viewing your MathWorks Account. Administrators can consult Administer Network Licenses.
If you have a Concurrent license, you must supply the port number and DNS address of the network license manager when you run the container. Add this option to the
docker runcommand when you start the container:
Quick Start Guide for MATLAB Deep Learning Container
This section shows an example of how to run the MATLAB Deep Learning Container and launch an interactive MATLAB session in a web browser. For a complete list of commands to start the MATLAB Deep Learning Container, including how to interact with MATLAB through a VNC client and how to use MATLAB in batch mode, see MATLAB Deep Learning Container Image on Docker Hub.
Pull Container Image
To download the MATLAB Deep Learning Container image onto the host machine, run this command on the command line:
docker pull mathworks/matlab-deep-learning:r20XYz
You must replace the tag
r20XYz with the specific MATLAB release name, for example,
r2022a. Downloading and
extracting the container image can take some time.
Run the MATLAB Deep Learning Container using this command:
docker run -it --rm -p 8888:8888 --shm-size=512M mathworks/matlab-deep-learning:r20XYz -browser
-itruns the container in interactive mode.
--rmdeletes the container when finished.
-p 8888:8888exposes port 8888 for the web browser connection.
--shm-size=512Msets the size of the shared memory to 512 MB, which is required for MATLAB desktop to run correctly.
:r20XYzchooses release version R20XYz of the MATLAB Deep Learning Container.
-browserchooses the option for interacting with MATLAB via a web browser.
Running the command above causes a URL to be printed to your terminal. To access MATLAB, enter the URL into a web browser. If prompted to do so, enter credentials for a MathWorks account associated with a MATLAB license.
-browseroption is supported by docker images from release version R2022a on. To access MATLAB in a web browser in custom docker images or older MATLAB docker images, see Examples.
-browseroption is not supported by some browsers. For more information, see Cloud Solutions Browser Requirements.
By default, a container does not have access to the hardware resources of the host
system. To give the container access to the GPUs of the host system, use the
--gpus flag of the
docker run command. To give the
container access to all of the GPUs of the host system, set this flag to
all. For example, executing this command runs a MATLAB container with access to all of the GPUs of the host system:
docker run --gpus all -it --rm --shm-size=512M mathworks/matlab-deep-learning:r2022a
For more information, see Use GPUs in Containers.
For a full list of options and environment variables that you can use to start the
container, run the container with the
docker run -it --rm mathworks/matlab-deep-learning:r20XYz -help
For more information about configuring a MathWorks container using environment variables, see Configure Containers.
- Get Started with Containers
- MATLAB Deep Learning Container on NVIDIA GPU Cloud for Amazon Web Services
- Administer Network Licenses