Skip to content

Commit 1a555c3

Browse files
committed
Fix MATLAB install path on images
1 parent 885b71d commit 1a555c3

18 files changed

Lines changed: 25 additions & 33 deletions

.github/workflows/parallel-server-images.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ jobs:
5353
tags: ${{ env.JM_IMAGE }}:${{ matrix.matlab-release }}
5454

5555
- name: Test MJS on container
56-
run: |
57-
MATLAB_ROOT="/opt/matlab/$(echo ${{ matrix.matlab-release }} | sed 's/^r/R/')"
58-
BIN_DIR="${MATLAB_ROOT}/toolbox/parallel/bin"
59-
docker run ${JM_IMAGE}:${{ matrix.matlab-release }} bash -c "${BIN_DIR}/mjs start && ${BIN_DIR}/startjobmanager && ${BIN_DIR}/glnxa64/mjshealthcheck -matlabroot ${MATLAB_ROOT}"
56+
env:
57+
BIN_DIR: /opt/matlab/toolbox/parallel/bin
58+
run: docker run ${JM_IMAGE}:${{ matrix.matlab-release }} bash -c "${BIN_DIR}/mjs start && ${BIN_DIR}/startjobmanager && ${BIN_DIR}/glnxa64/mjshealthcheck -matlabroot /opt/matlab"
6059

6160
- name: Push to GHCR
6261
uses: docker/build-push-action@v5
@@ -108,9 +107,7 @@ jobs:
108107
- name: Test MATLAB on container
109108
env:
110109
MLM_LICENSE_FILE: /tmp/license.lic # License file path on container
111-
run: |
112-
MATLAB_ROOT="/opt/matlab/$(echo ${{ matrix.matlab-release }} | sed 's/^r/R/')"
113-
docker run -v ${LICENSE_FILE_PATH}:${MLM_LICENSE_FILE} ${WORKER_IMAGE}:${{ matrix.matlab-release }} bash -c "MLM_LICENSE_FILE=${MLM_LICENSE_FILE} ${MATLAB_ROOT}/bin/matlab -batch 'version'"
110+
run: docker run -v ${LICENSE_FILE_PATH}:${MLM_LICENSE_FILE} ${WORKER_IMAGE}:${{ matrix.matlab-release }} bash -c "MLM_LICENSE_FILE=${MLM_LICENSE_FILE} /opt/matlab/bin/matlab -batch 'version'"
114111

115112
- name: Push to GHCR
116113
uses: docker/build-push-action@v5

images/job-manager/Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,21 @@ RUN export DEBIAN_FRONTEND=noninteractive \
2929
&& rm -rf /var/lib/apt/lists/*
3030

3131
# Run mpm to install MATLAB.
32-
# Install to /opt/matlab/<ReleaseNumber> to match the mathworks/matlab Docker image layout.
33-
RUN MATLAB_INSTALL_DIR="/opt/matlab/$(echo ${MATLAB_RELEASE} | sed 's/^r/R/')" \
34-
&& wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
32+
RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
3533
&& chmod +x mpm \
3634
&& sudo ./mpm install \
3735
--release=${MATLAB_RELEASE} \
38-
--destination=${MATLAB_INSTALL_DIR} \
36+
--destination=/opt/matlab \
3937
--products MATLAB \
4038
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) \
4139
&& sudo rm -rf mpm /tmp/mathworks_root.log
4240

4341
# Run mpm to install MATLAB Parallel Server.
44-
RUN MATLAB_INSTALL_DIR="/opt/matlab/$(echo ${MATLAB_RELEASE} | sed 's/^r/R/')" \
45-
&& wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
42+
RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
4643
&& chmod +x mpm \
4744
&& sudo ./mpm install \
4845
--release=${MATLAB_RELEASE} \
49-
--destination=${MATLAB_INSTALL_DIR} \
46+
--destination=/opt/matlab \
5047
--products MATLAB_Parallel_Server \
5148
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) \
5249
&& sudo rm -rf mpm /tmp/mathworks_root.log

images/worker/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@ ENV INPUT_DIR=/tmp/${MATLAB_RELEASE}
3535
COPY mpm-input-files/${MATLAB_RELEASE} ${INPUT_DIR}
3636

3737
# Run mpm to install Simulink.
38-
# Install to /opt/matlab/<ReleaseNumber> to match the mathworks/matlab Docker image layout.
39-
RUN MATLAB_INSTALL_DIR="/opt/matlab/$(echo ${MATLAB_RELEASE} | sed 's/^r/R/')" \
40-
&& if [ ${INCLUDE_SIMULINK} = true ]; then \
38+
RUN if [ ${INCLUDE_SIMULINK} = true ]; then \
4139
wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
4240
&& chmod +x mpm \
4341
&& sudo ./mpm install \
4442
--release=${MATLAB_RELEASE} \
45-
--destination=${MATLAB_INSTALL_DIR} \
43+
--destination=/opt/matlab \
4644
--products Simulink \
4745
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) \
4846
&& sudo rm -rf mpm /tmp/mathworks_root.log; \

images/worker/mpm-input-files/r2024a/matlab-toolboxes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
## Set the desired value for destinationFolder and
5656
## uncomment the following line.
5757

58-
destinationFolder=/opt/matlab/R2024a
58+
destinationFolder=/opt/matlab
5959

6060

6161
########################################################################

images/worker/mpm-input-files/r2024a/simulink-toolboxes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
## Set the desired value for destinationFolder and
5656
## uncomment the following line.
5757

58-
destinationFolder=/opt/matlab/R2024a
58+
destinationFolder=/opt/matlab
5959

6060

6161
########################################################################

images/worker/mpm-input-files/r2024a/support-packages.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
## Set the desired value for destinationFolder and
5656
## uncomment the following line.
5757

58-
destinationFolder=/opt/matlab/R2024a
58+
destinationFolder=/opt/matlab
5959

6060

6161
########################################################################

images/worker/mpm-input-files/r2024b/matlab-toolboxes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
## Set the desired value for destinationFolder and
5656
## uncomment the following line.
5757

58-
destinationFolder=/opt/matlab/R2024b
58+
destinationFolder=/opt/matlab
5959

6060

6161
########################################################################

images/worker/mpm-input-files/r2024b/simulink-toolboxes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
## Set the desired value for destinationFolder and
5656
## uncomment the following line.
5757

58-
destinationFolder=/opt/matlab/R2024b
58+
destinationFolder=/opt/matlab
5959

6060

6161
########################################################################

images/worker/mpm-input-files/r2024b/support-packages.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
## Set the desired value for destinationFolder and
5656
## uncomment the following line.
5757

58-
destinationFolder=/opt/matlab/R2024b
58+
destinationFolder=/opt/matlab
5959

6060

6161
########################################################################

images/worker/mpm-input-files/r2025a/matlab-toolboxes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
## Set the desired value for destinationFolder and
7070
## uncomment the following line.
7171

72-
destinationFolder=/opt/matlab/R2025a
72+
destinationFolder=/opt/matlab
7373

7474

7575
########################################################################

0 commit comments

Comments
 (0)