Docker container to run compiled Matlab executable in Windows 10

18 ビュー (過去 30 日間)
George Corliss
George Corliss 2020 年 7 月 31 日
コメント済み: Sok Ming Jamie 2024 年 7 月 12 日
I want to run a compiled Matlab executable inside a Docker container under Windows 10. I can copy the appropriate Matlab runtime and point to it. When I execute inside the container, after a short pause, I get a fresh command prompt, but no output, warning, or error. Perhaps some Java piece is not configured correctly?

回答 (1 件)

George Corliss
George Corliss 2020 年 8 月 2 日
Duh. I need to INSTALL the desired MATLAB runtime in the Docker image, not just copy the necessary files. I adapted from https://www.mathworks.com/matlabcentral/answers/438576-open-exe-file-with-docker
Dockerfile:
# docker build --no-cache --tag testing --force .
# docker run testing hello
# Line 1: Use dotnet-framework base image
FROM microsoft/dotnet-framework
# Previously downloaded and unzipped installer:
COPY ["/MATLAB_Runtime_R2019a_Update_8_win64", "/MATLAB_Runtime_win64"]
# Several programs I may wish to execute:
COPY /bin .
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Takes about 10 minutes to install:
RUN Start-Process C:\MATLAB_Runtime_win64\setup.exe -ArgumentList '-mode silent', '-agreeToLicense yes' -Wait
# Line 6: Installation folder after setup is complete
RUN Remove-Item -Force -Recurse C:\\MATLAB_Runtime_win64
Works like a charm!
  2 件のコメント
jeremy engelbrecht
jeremy engelbrecht 2020 年 9 月 17 日
HI George
Sorry to bother but when you did the install, did it create a MATLAB directory in your program files folder in your container. reason I am asking is that it seems it is not installing the runtime in my container.
Sok Ming Jamie
Sok Ming Jamie 2024 年 7 月 12 日
Hi Jeremy,
did you manage to resolve the installation issue? I, too, am unable to install the runtime in my container and I'm hoping you might be able to share the fix. I'm using Windows servercore:ltsc2019 base image, with MATLAB runtime r2020b.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by