MATLAB Container on Docker Hub
Access MATLAB® on the cloud or in server environments by using the MATLAB container available on Docker Hub. The MATLAB container provides a simple and flexible solution to run MATLAB in cloud environments such as AWS® or Microsoft® Azure®. For more information on containers, see What is a Container?.
The MATLAB container includes:
An Ubuntu® base image
MATLAB (no additional toolboxes)
Dependencies to run all MathWorks® products
Software to enable interaction with the MATLAB desktop
To use the MATLAB container, you need:
A host machine with Docker® installed.
A MATLAB license that is:
Valid for all the MathWorks products installed in the container.
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 , 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 Container
This section shows an example of how to run the MATLAB container and launch an interactive MATLAB session in a web browser. For a complete list of commands to start the MATLAB container, including how to interact with MATLAB through a VNC client and how to use MATLAB in batch mode, see MATLAB Container Image on Docker Hub.
To download the MATLAB container image onto the host machine, run this command on the command line:
docker pull mathworks/matlab:r20XYz
You must replace the tag
r20XYz with the specific
MATLAB release name, for example,
and extracting the container image can take some time.
Run the MATLAB container using this command:
docker run -it --rm -p 8888:8888 --shm-size=512M mathworks/matlab: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 to run correctly.
:r20XYzchooses release version R20XYz of the MATLAB 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.
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: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