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 What is a Container?.
The MATLAB Deep Learning Container includes:
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 (Deep Learning Toolbox)
Support packages useful for deep learning workflows
Dependencies to run all MathWorks® products
GPU drivers necessary to use NVIDIA GPUs in the container
Software to enable interaction with the MATLAB desktop
In addition, 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.
To use the MATLAB Deep Learning Container, you need:
A host machine with Docker® 19.03 or newer installed.
A MATLAB license that meets the following conditions:
Valid for all the MathWorks products installed in the container. You can obtain a trial license for products in the MATLAB Deep Learning Container at MATLAB Trial for Deep Learning on the Cloud
Current on Software Maintenance Service (SMS).
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 type, you must supply the port number and DNS address of the network license manager when you run the container. Add an option of the following form 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 access the MATLAB desktop from a web browser. For a complete list of commands to start the MATLAB Deep Learning Container, including how to use MATLAB in batch mode, see MATLAB Deep Learning Container Image on Docker Hub.
To download the MATLAB Deep Learning Container image onto the host machine, run this code:
docker pull mathworks/matlab-deep-learning:r20XYz
You must replace the tag
r20XYz with the specific MATLAB release name, for example,
r2021b. Note that downloading
and extracting the container image can take some time.
Run the MATLAB Deep Learning Container using this command:
docker run --gpus all -it --rm -p 5901:5901 -p 6080:6080 --shm-size=512M mathworks/matlab-deep-learning:r20XYz -vnc
--gpus allmakes the GPUs of the host visible to the container. For more information, see Use GPUs in Containers.
-itruns the container in interactive mode.
--rmdeletes the container when finished.
-p 6080:6080expose port 5901 for the VNC connection and port 6080 for the web browser connection.
--shm-size=512Msets the size of shared memory to 512 MB, which is required for MATLAB desktop to run correctly.
:r20XYzchooses the release version of the MATLAB Deep Learning Container.
-vncstarts the VNC server process for MATLAB desktop.
To access the MATLAB desktop via a web browser, use the URL
hostname is the name
of the machine hosting the container. To access the container, use the default password
matlab. Alternatively, you can use the same password to access the
container via a VNC client. If you are using a cloud service provider or if your host or
client machines are protected by a firewall, you must set up SSH tunnels between your
client machine and the Docker host to access the container desktop. For detailed instructions, see Create Encrypted Connection to Remote Applications and 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.
- What is a Container?
- MATLAB Deep Learning Container on NVIDIA GPU Cloud for Amazon Web Services
- Administer Network Licenses