Is it possible to install matlab in a docker image?
Show older comments
I wanted to install my matlab in a docker image. Is that possible?
4 Comments
Chetan Rawal
on 7 Sep 2017
I work at MathWorks and would be happy to understand your requirements to guide the development of future products to make Docker workflows easier. Please email me at chetan.rawal@mathworks.com
Walter Roberson
on 7 Sep 2017
Note that the original author would not have been notified of your comment
Jens Hoffmann
on 30 Nov 2017
I'm using the network emulation tool GNS3 (www.gns3.com) and trying also to use MatLab/Simulink to correlate the behaviour of mobile users with the network behaviour by injection of mobile parameters of each single host. Running MatLab in a docker image could be helpful.
Cédric
on 10 Apr 2019
Hello, I would also be interested in that workflow. Is there any updates on this topic?
Answers (5)
David Willingham
on 7 Apr 2021
Edited: David Willingham
on 14 Oct 2021
5 votes
In addition to GitHub, the MATLAB container is also now available in dockerhub!
There's also the Deep Learning container that includes more toolboxes:
5 Comments
DAIJIRY NARZARY
on 30 Aug 2021
Can we create standalone application in Matlab with Mac Os??? I am trying to open my fiunction in docker but it's said that we need linux inorder to do that. Can it be done without linux??
David Willingham
on 14 Oct 2021
Hi Daijiry, the docker image is based on Linux but you can run it with X11. HAve you tried this?
Run MATLAB desktop using X11
To start the container and run MATLAB desktop using X11, execute:
$ xhost +
$ docker run --gpus all -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro --shm-size=512M mathworks/matlab-deep-learning:r2021b
The MATLAB desktop window should open on your machine. Note that the command above works only on a Linux operating system with X11 and its dependencies installed.
William Collins
on 22 Dec 2021
@David Willingham I have an Individual license, which allows me to run the docker container in interactive mode, prompting me for my username & password, which works fine.
How can I run this docker container in batch mode with this license? Can I pass my username & password through as environment variables somehow?
David Willingham
on 11 Jan 2022
Hi William, with a stand alone license, running the container in batch isn't available. We are currently investigating options to support this use case in the future.
Seshagiri
on 11 Apr 2023
Any update on running container in batch mode with individual license?
It is possible to create a Docker container image for MATLAB, Simulink, and any toolboxes you are using. Instructions for this can be found on GitHub:
7 Comments
David Parks
on 17 Jun 2020
Edited: David Parks
on 17 Jun 2020
I'm stuck on step 3.2 of these instructions:
> Select the Install and Activate tab. Select the link “Activate to Retrieve License File”.
That page asks for the Host ID. I don't know what that means in Docker terms. The link under that option titled, "How do I find my computer's host id?", mentions docker only once in a cryptic comment that isn't solving my problem.
After chatting with someone at Mathworks online chat I understood that I need a Concurrent License, which appears to require a license administrator. After contacting IT at our Univerisity we're told they don't support Matlab and we need to talk to Mathworks.
I'm still unable to install Matlab in docker after a day of back and forth. Any ideas?
tyler sheffield
on 5 Aug 2020
I understand Host ID to be the Ethernet MAC address. Mine are the same inside Docker and out.
Thomas Close
on 14 Sep 2020
Thanks Scott. Do you know whether it is possible to distribute a image built with that method (i.e. with a version of Matlab installed on it) but omit the licence? I'm guessing not, but just wanted to rule it out.
Urtzi Markiegi
on 8 May 2021
Thanks. Do you know if it is possible to run a simulink model inside the container?
Walter Roberson
on 8 May 2021
Yes, it is possible.
Urtzi Markiegi
on 9 May 2021
Thanks Walter. Could you please provide a reference to pave the way? I'm not shure if this is the best starting point: https://hub.docker.com/r/mathworks/matlab-deps
Walter Roberson
on 9 May 2021
Sorry, not something I have ever worked with myself.
Brian Lerner
on 2 Aug 2018
2 votes
Hello Matlab support. We are very interested in this functionality. can you please advise the best way to do this?
Walter Roberson
on 28 Mar 2017
0 votes
Yes. Activation might be a problem though.
2 Comments
Gilad Book
on 24 Apr 2018
Do you know any solution for this? I try to install matlab runtiome in docker image on windows but I have a licensing issue.
Did you succeed to do this? Thanks.
Walter Roberson
on 3 Aug 2018
The information at https://www.mathworks.com/matlabcentral/answers/407335-is-it-possible-to-use-polyspace-with-docker might help.
Deependra Mishra
on 19 Apr 2019
0 votes
Here is the link I found which might help.
Categories
Find more on Containers in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!