Is it possible to trim the MATLAB Runtime install on a Docker image?
11 views (last 30 days)
Show older comments
Installing the MATLAB Runtime on a Docker image bloats the image about 2 GB. Is there any way to trim this down to the essentials?
Example:
2 Comments
Gautam Mohan
on 31 Mar 2016
Hi Cameron,
Unfortunately MATLAB does not support selectively creating the MCR to include only essential components.
If you compile a numerics-only application within MATLAB, the packaged MCR will be smaller (~300mb). However, this MCR is only available if the application is deployed from MATLAB. MathWorks only hosts the full-sized MCR on its website.
Currently it looks like your Dockerfile downloads the full MCR from our website. If you were interested in a numerics-only MCR, you would have to obtain it your self by compiling a base functions-only application in MATLAB, and then host that MCR somewhere for download. Bear in mind that anyone who wants to use MATLAB in more ways than the base functionality would find the numerics-only MCR sufficient.
I apologize that we do not offer a customizable MCR, and that the full-sized or numerics-only MCRs are your only choices. Best of luck.
Hope this helps!
Gautam Mohan
Nicole Bonfatti
on 13 Aug 2024 at 14:32
This is now supported since R2023b: See doc for compiler.runtime.createDockerImage()
Answers (0)
See Also
Categories
Find more on Startup and Shutdown 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!