Can I use my individual license inside a docker container for CI purposes using matlab docker image?

53 views (last 30 days)
I'm trying to use a matlab docker image based on a linux image to create standalone artifacts for use on linux targets.
Running the container as instructed on mathworks/matlab - Docker Image | Docker Hub I can use matlab in batch mode if I log into my mathworks account first. When I mount my license file onto the container, matlab fails to verify my license because the license uses the C: serial number on my windows machine, but matlab inside linux trys to use an ethernet adapter instead. I checked this with instructions on What is a Host ID? How do I find my Host ID in order to activate my license? - MATLAB Answers - MATLAB Central (mathworks.com)
Can I somehow make matlab verify my indivudal license for my use case, or do I specifically need a network license / concurrent license for this? For example is there a way to run the login in batch mode so that there is no prompt when running matlab?
Since Docker is running inside a VM I don't see a practical approaches to make this work. Even if I somehow change my license to be verfied against my windows machine's ethernet adapter and make attach my docker containers to the host network, the host will be the VM, docker is using on windows and the ethernet addresses will still not match.
In case this is important: The products I need to use are Matlab, Matlab compiler, Matlab Compiler SDK and Simulink Compiler.
  3 Comments
Christopher Wunder
Christopher Wunder on 29 Aug 2023
Sorry for coming back so late, I hadn't noticed you answered so quickly @Walter Roberson.
Thanks for your answer. Yes, I also read that part of the documentation. Unfortunately it does not go into detail as to how to use an individual license with a container for day to day purposes. My License is linked to a mathworks account and has permissions for the products needed.
The usage of individual licenses for containers was apparently intended for more individual usages where a required login is no obstacle.
@sharon bader No I don't yet have a solution. But I reached out to someone at mathworks who might be able to help (although it will still be a few weeks). If we find a workaround for my problem, I'll post it here if still possible.

Sign in to comment.

Answers (1)

Ninad
Ninad on 25 Aug 2023
Using an individual MATLAB license within a Docker container for Continuous Integration (CI) depends on your license terms. Typically, individual licenses are for personal use and may not permit running MATLAB in a container for CI. License agreements outline containerization and CI usage terms. To check your license agreement, you may take the following steps:
  1. Launch MATLAB on your computer.
  2. In the MATLAB menu bar, go to “Help” (dropdown) > “Licensing” > click “Manage Licenses”.
  3. You shall be redirected to MathWorks License Center in the browser.
  4. Click on the product that you want to review (Expecting it to be “MATLAB” in your case.
  5. Go to the “Install and Activate” tab. You should get the necessary information as shown in the attached snapshot.
If you face the above limitations, it is advisable to explore alternative licensing options like network or concurrent licenses. These licenses are better suited for using MATLAB within containers or virtual machines, providing more flexibility in license verification. Reviewing terms and reaching out to your license administrator is recommended for using MATLAB within a Docker container for CI with an individual license.
  2 Comments
Walter Roberson
Walter Roberson on 25 Aug 2023
Individual licenses are generally valid for commercial use. The forms of licence that are only for personal use are Home and Student licenses.
The document I linked to says directly that Individual licenses are valid for cloud use in containers and are already configured for that purpose.
Christopher Wunder
Christopher Wunder on 29 Aug 2023
Edited: Christopher Wunder on 29 Aug 2023
@Ninad Yes I'm aware that network/concurrent licenses are better suited for this (flexibility wise, my license does have the necessary product permissions and my use case only requires matlab to run on my personal computer for a short time BUT inside a container for CI purposes), but that would require a change in how licenses are used and distributed in my organisation, and that's currently not possible for me to achieve.

Sign in to comment.

Categories

Find more on Containers in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!