필터 지우기
필터 지우기

Execute a Matlab script from Docker container

조회 수: 15 (최근 30일)
pierre
pierre 2024년 6월 21일
댓글: pierre 2024년 6월 21일
Hello,
I have a very basic matlab file called hello_world.m that just create a simple .csv file. My goal is now to try to execute this matlab script from a Docker container. This is my Dockerfile:
FROM mathworks/matlab:r2024a
ENV MLM_LICENSE_FILE /licenses
USER root
RUN mkdir -p /licenses /matlab_script
COPY license.lic /licenses/license.lic
COPY hello_world.m /matlab_script/hello_world.m
WORKDIR /matlab_script
CMD ["matlab", "-batch", "hello_world"]
The license.lic attatched is a "DEMO" license.
This is the command I use to run my container:
docker run --rm -v $(pwd)/license.lic:/licenses/license.lic matlab-demo
Error l
ogs:
License checkout failed.
License Manager Error -9
Your username does not match the username in the license file.
To run on this computer, you must run the Activation client to reactivate your license.
Is it because I am using a "demo"license?

답변 (1개)

Muskan
Muskan 2024년 6월 21일
You can refer to the following MATLAB Answer to help troubleshoot license related issues:
I hope this helps!
  댓글 수: 1
pierre
pierre 2024년 6월 21일
Thanks, The activation is not present under the bin folder and nowhere else:
find . -name "activate_matlab.sh"
# no results
Also, 1 licence = 1 machine, so how can I take a license that was installed on my windows destop to a docker image since the host_id will be different?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Containers에 대해 자세히 알아보기

태그

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by