How can I install specific products within the MATLAB Runtime to save space?

3 views (last 30 days)
I have a compiled MATLAB application and I want to distribute it as space efficiently as possible. Specifically, I want to create a small Docker container with the application and all the dependencies. How can I do this without installing the entire MATLAB Runtime?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 17 Apr 2024 at 0:00
Edited: MathWorks Support Team on 17 Apr 2024 at 14:27
We have an official workflow for creating a Docker container for a compiled MATLAB application. The resulting container will not have the entire MATLAB Runtime installed, however it will include the portions of the Runtime which the compiled application depends upon.
This workflow can only be done on Linux and it requires that Docker be installed and runnable by the same user who is running MATLAB (if Docker can only be run as root, MATLAB must be run as root). This process also requires an internet connection, as MATLAB will have to download a copy of the Runtime installer and pull an Ubuntu Docker image during this process.
See this documentation page:
Package MATLAB Standalone Applications into Docker Images
If creating a Docker container is not the goal, you can still deploy your compiled application in a space-efficient manner by creating a 'Standalone Application'. This application will have its own installer which includes the dependencies for the application. Running the installer will install both the application and the necessary Runtime libraries, without installing all Runtime libraries.
See this documentation page:
Create Standalone Application from MATLAB

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!