Multi-User Matlab Docker Setup

조회 수: 8 (최근 30일)
Soul45
Soul45 2024년 10월 12일
답변: Swastik Sarkar 2024년 10월 16일
Some backstory on how things have been: I am working with a small team and we have a few beafy servers on which we run our models. We have Matlab installed and the instances can access a licence server, so we do not have to login with private accounts or something similar. Via X11 forwarding, anyone can run a Matlab instance and it does not conflict with other users. A colleague even mentioned that user settings are stored in the users home folder, so everyone has their preferences tailored to them, if they wish for it!
Now I was thinking to move the setup to a docker container, or even multiple of them. Some key benefits are:
  • easier version managing (just change the tag of the image)
  • the session does not terminate if the connection is cut for a short time
  • sometimes it can be really frustrating to install Matlab on servers with no GUI interface!
The only problem with this approach is: no private instances. Doesn't matter if it is via browser and/or vnc, the actions are always mirrored, so people are basically sharing the same session. I was wondering if there is a way to manage this behavior? Some "matlab user managing hub", which allows for multiple different session depending on the user (somehow, maybe a login via LDAP).
The only idea to bypass this "problem", would be a custom bash script which executes a docker command and runs a private instance, and forwards the vnc/browser ports depending on the users id on the machine, and mounts their home folder into the container. This isn't really elegant, but would get the job done.
If someone has a better solution, I would be eager to learn it. And if my solution peaks someones interest, and I get it to work successfully, hit me up and I can share it here :)

답변 (1개)

Swastik Sarkar
Swastik Sarkar 2024년 10월 16일
The specified reasons for using Docker can be addressed without it.
  • easier version managing (just change the tag of the image)
  • sometimes it can be really frustrating to install Matlab on servers with no GUI interface!
This can be managed by using the MATLAB Package Manager (mpm), which facilitates the installation of specific releases and products without using a GUI. For more information refer below documentation:
  • the session does not terminate if the connection is cut for a short time
An application called Xpra can be used to manage open windows from X11 forwarding, ensuring session continuity. Further details can be found below:
Hope this helps.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by