Docker container to run compiled Matlab executable in Windows 10

18 Ansichten (letzte 30 Tage)
George Corliss
George Corliss am 31 Jul. 2020
Kommentiert: Sok Ming Jamie am 12 Jul. 2024
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?

Antworten (1)

George Corliss
George Corliss am 2 Aug. 2020
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 Kommentare
jeremy engelbrecht
jeremy engelbrecht am 17 Sep. 2020
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 am 12 Jul. 2024
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by