Install parallel computing toolbox in matlab docker

69 visualizzazioni (ultimi 30 giorni)
Hi Community,
I am struggling with installing parallel computing toolbox within matlab docker images (latest version).
Some problems:
1. The matlab docker image browser version does not support Add-on Explorer, which means I cannot install the toolbox directly.
2. The docker image suggests using File Exchange to download the toolbox. However, I can not find the parallel computing toolbox in File Exchange.
3. With my education license, the parallel computing toolbox is automatically installed. No .mltbx file is provided, which makes local installation inaccessible inside docker.
On the other hand, the offical matlab docker documentation says add-ons can be installed.
Can anyone offer some help? Thank you very much !!!

Risposta accettata

Kojiro Saito
Kojiro Saito il 5 Dic 2022
Modificato: Kojiro Saito il 6 Dic 2022
Web browser version does not support Add-On Explorer, so, you need to launch MATLAB with VNC options.
docker run -it --rm -p 5901:5901 -p 6080:6080 --shm-size=512M mathworks/matlab:r2022b -vnc
Then, in your web browser, type "http://localhost:6080/" in address bar.
You can access Linux's desktop environment.
Next, launch "Terminal Emulator", and type
sudo matlab
to launch MATLAB with sudo. It's because MATLAB is installed in /opt/matlab/R2022b with root write permissions.
Then, you can launch Add On Explorer and install toolboxes.
UPDATED
Also, there is a command line way instead of Add-On Explorer.
MATLAB Package Manager (MPM) is available from GitHub.
In Terminal Emulator, download MPM with wget and install Parallel Computing Toolbox with MPM.
wget https://www.mathworks.com/mpm/glnxa64/mpm
chmod +x mpm
sudo ./mpm install --release=R2022b --destination=/opt/matlab/R2022b/ --products Parallel_Computing_Toolbox
Installation Results:
Hope this work.
  6 Commenti
Kojiro Saito
Kojiro Saito il 27 Mar 2023
Regarding above 3., product names should be ROS_Toolbox for ROS Toolbox.
So, the following will work.
sudo ./mpm install --release=R2022b --destination=/path/to/MATLAB/R2022b/ --product ROS_Toolbox
Caspar Hanselaar
Caspar Hanselaar il 27 Mar 2023
Thank you for the quick answer, installation is now running!

Accedi per commentare.

Più risposte (1)

Prabhakar
Prabhakar il 27 Mar 2023
One could also build a container with additional toolboxes by using the Dockerfile listed below.
This example installs the ROS Toolbox & the Parallel Computing Toolbox. Using the MATLAB Package Manager.
See MPM.md for more information.
Commands to run on your terminal:
#Ensures that latest image is pulled
docker pull mathworks/matlab:r2022b
#navigate to the directory in which you have Downloaded the provided Dockerfile
docker build -t matlab-with-toolboxes:r2022b .
#run your container to verify that the desired toolboxes are present
docker run -it --rm matlab-with-toolboxes:r2022b
Running matlab
MATLAB is selecting SOFTWARE OPENGL rendering.
Please enter your MathWorks Account email address and press Enter:
enter-your@mathworks-account-email.com
Single-Sign-On(SSO) is not available in this environment. You need a one-time password to sign in to MATLAB.
Step 1. Visit https://www.mathworks.com/mw_account/otp
Step 2. Copy the password.
Step 3. Return here, and input the password.
Please enter the one-time password:
475445
Starting MATLAB with license: 2352353
< M A T L A B (R) >
Copyright 1984-2022 The MathWorks, Inc.
R2022b Update 5 (9.13.0.2193358) 64-bit (glnxa64)
February 10, 2023
Warning: X does not support locale C
To get started, type doc.
For product information, visit www.mathworks.com.
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.13.0.2193358 (R2022b) Update 5
MATLAB License Number: 40447121
Operating System: Linux 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.13 (R2022b)
Parallel Computing Toolbox Version 7.7 (R2022b)
ROS Toolbox Version 1.6 (R2022b)
Dockerfile:
FROM mathworks/matlab:r2022b
USER root
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && \
apt-get install --no-install-recommends --yes wget \
build-essential \
cmake && \
apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
WORKDIR /opt/matlab
RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm && \
chmod +x mpm && \
./mpm install --destination=/opt/matlab/R2022b/ --release=R2022b \
ROS_Toolbox Parallel_Computing_Toolbox \
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) && \
rm -f mpm /tmp/mathworks_root.log && \
ln -fs /opt/matlab/R2022b/bin/matlab /usr/local/bin/matlab
WORKDIR /home/matlab/Documents/MATLAB
USER matlab
HTH
  1 Commento
Prabhakar
Prabhakar il 9 Apr 2024 alle 16:10
Yes, https://github.com/mathworks-ref-arch/matlab-dockerfile/tree/main/mpm-input-files
It's usage is documented in the MPM readme in the same repository.

Accedi per commentare.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by