Skip to content

Commit

Permalink
Updates to repository for MATLAB R2024a.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmcdonnellmw authored and Prabhakar Kumar committed Mar 21, 2024
1 parent a26fd31 commit 31b2d96
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 57 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022-2023 The MathWorks, Inc.
# Copyright 2022-2024 The MathWorks, Inc.

name: Build, Test and Publish the Dockerfile

Expand Down Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
matlab-release: [r2023b, r2023a, r2022b, r2022a, r2021b, r2021a, r2020b]
matlab-release: [r2024a, r2023b, r2023a, r2022b, r2022a, r2021b, r2021a, r2020b]

steps:
- name: Checkout repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/from-matlab-docker-build-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 The MathWorks, Inc.
# Copyright 2023-2024 The MathWorks, Inc.

name: Build and Test the "Building on MATLAB Docker Image" Dockerfile

Expand Down Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
matlab-release: [r2023b, r2023a, r2022b, r2022a]
matlab-release: [r2024a, r2023b, r2023a, r2022b, r2022a]

steps:
- name: Checkout repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/matlab-installer-build-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 The MathWorks, Inc.
# Copyright 2023-2024 The MathWorks, Inc.

name: Build and Test the "MATLAB installer" Dockerfile

Expand Down Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
matlab-release: [r2023b, r2023a, r2022b, r2022a, r2021b, r2021a, r2020b]
matlab-release: [r2024a, r2023b, r2023a, r2022b, r2022a, r2021b, r2021a, r2020b]

steps:
- name: Checkout repo
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Copyright 2019 - 2023 The MathWorks, Inc.
# Copyright 2019 - 2024 The MathWorks, Inc.
# This Dockerfile allows you to build a Docker® image with MATLAB® installed using the MATLAB Package
# Manager. Use the optional build arguments to customize the version of MATLAB, list of products to
# install, and the location at which to install MATLAB.

# Here is an example docker build command with the optional build arguments.
# docker build --build-arg MATLAB_RELEASE=r2023b
# docker build --build-arg MATLAB_RELEASE=r2024a
# --build-arg MATLAB_PRODUCT_LIST="MATLAB Deep_Learning_Toolbox Symbolic_Math_Toolbox"
# --build-arg MATLAB_INSTALL_LOCATION="/opt/matlab/R2023b"
# --build-arg MATLAB_INSTALL_LOCATION="/opt/matlab/R2024a"
# --build-arg [email protected]
# -t my_matlab_image_name .

# To specify which MATLAB release to install in the container, edit the value of the MATLAB_RELEASE argument.
# Use lowercase to specify the release, for example: ARG MATLAB_RELEASE=r2021b
ARG MATLAB_RELEASE=r2023b
ARG MATLAB_RELEASE=r2024a

# Specify the list of products to install into MATLAB.
ARG MATLAB_PRODUCT_LIST="MATLAB"
Expand Down Expand Up @@ -63,7 +63,7 @@ RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
--destination=${MATLAB_INSTALL_LOCATION} \
--products ${MATLAB_PRODUCT_LIST} \
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) \
&& sudo rm -f mpm /tmp/mathworks_root.log \
&& sudo rm -rf mpm /tmp/mathworks_root.log ${HOME}/.MathWorks \
&& sudo ln -s ${MATLAB_INSTALL_LOCATION}/bin/matlab /usr/local/bin/matlab

# Note: Uncomment one of the following two ways to configure the license server.
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ cd matlab-dockerfile

Build container with a name and tag of your choice.
```bash
docker build -t matlab:r2023b .
docker build -t matlab:r2024a .
```

Run the container. Test the container by running an example MATLAB command such as ver.
```bash
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2023b -batch ver
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2024a -batch ver
```
The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) defaults to building a container for MATLAB R2023b.
The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) defaults to building a container for MATLAB R2024a.

The example command `ver` displays the version number of MATLAB and other installed products. For more information, see [ver](https://www.mathworks.com/help/matlab/ref/ver.html). For more information on running the container, see the section on [Running the Container](#run-the-container).

Expand All @@ -57,9 +57,9 @@ The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/ma

| Argument Name | Default value | Description |
|---|---|---|
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | r2023b | The MATLAB release you want to install, in lower-case. For example: `r2019b`|
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | r2024a | The MATLAB release you want to install, in lower-case. For example: `r2019b`|
| [MATLAB_PRODUCT_LIST](#build-an-image-with-a-specific-set-of-products) | MATLAB | Products to install as a space-separated list. For more information, see [MPM.md](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md). For example: `MATLAB Simulink Deep_Learning_Toolbox Fixed-Point_Designer`|
| [MATLAB_INSTALL_LOCATION](#build-an-image-with-matlab-installed-to-a-specific-location) | /opt/matlab/r2023b | The path to install MATLAB. |
| [MATLAB_INSTALL_LOCATION](#build-an-image-with-matlab-installed-to-a-specific-location) | /opt/matlab/r2024a | The path to install MATLAB. |
| [LICENSE_SERVER](#build-an-image-with-license-server-information) | *unset* | The port and hostname of the machine that is running the Network License Manager, using the `port@hostname` syntax. For example: `27000@MyServerName` |

Use these arguments with the the `docker build` command to customize your image.
Expand All @@ -74,24 +74,24 @@ docker build --build-arg MATLAB_RELEASE=r2019b -t matlab:r2019b .
#### Build an Image with a specific set of products
For example, to build an image with MATLAB and Simulink®, use this command.
```bash
docker build --build-arg MATLAB_PRODUCT_LIST='MATLAB Simulink' -t matlab:r2023b .
docker build --build-arg MATLAB_PRODUCT_LIST='MATLAB Simulink' -t matlab:r2024a .
```

#### Build an Image with MATLAB installed to a specific location
For example, to build an image with MATLAB installed at /opt/matlab, use this command.
```bash
docker build --build-arg MATLAB_INSTALL_LOCATION='/opt/matlab' -t matlab:r2023b .
docker build --build-arg MATLAB_INSTALL_LOCATION='/opt/matlab' -t matlab:r2024a .
```

#### Build an Image with License Server Information

Including the license server information with the `docker build` command means you do not have to pass it when running the container.
```bash
# Build container with the License Server.
docker build --build-arg LICENSE_SERVER=27000@MyServerName -t matlab:r2023b .
docker build --build-arg LICENSE_SERVER=27000@MyServerName -t matlab:r2024a .

# Run the container, without needing to pass license information.
docker run --init --rm matlab:r2023b -batch ver
docker run --init --rm matlab:r2024a -batch ver
```

## Use the Network License Manager
Expand Down Expand Up @@ -124,7 +124,7 @@ With the `docker build` command, either:

```bash
# Example
docker build -t matlab:r2023b --build-arg LICENSE_SERVER=27000@MyServerName .
docker build -t matlab:r2024a --build-arg LICENSE_SERVER=27000@MyServerName .
```
- Use the `network.lic` file:
1. Place the `network.lic` file in the same folder as the Dockerfile.
Expand All @@ -133,41 +133,41 @@ With the `docker build` command, either:

```bash
# Example
docker build -t matlab:r2023b .
docker build -t matlab:r2024a .
```

With the `docker run` command, use the `MLM_LICENSE_FILE` environment variable. For example:

```bash
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2023b -batch ver
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2024a -batch ver
```

## Run the Container
If you did not provide the license server information when building the image, then provide it when running the container. Set the environment variable `MLM_LICENSE_FILE` using the `-e` flag, with the network license manager's location in the format `port@hostname`.
```bash
# Start MATLAB, print version information, and exit:
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2023b -batch ver
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:r2024a -batch ver
```
You can run the container **without** specifying `MLM_LICENSE_FILE` if you provided the license server information when building the image, as shown in the examples below.
### Run MATLAB in an Interactive Command Prompt
To start the container and run MATLAB in an interactive command prompt, execute:
```bash
docker run --init -it --rm matlab:r2023b
docker run --init -it --rm matlab:r2024a
```
### Run MATLAB in Batch Mode
To start the container, run a MATLAB command, and then exit, execute:
```bash
# Container runs the command RAND in MATLAB and exits.
docker run --init --rm matlab:r2023b -batch rand
docker run --init --rm matlab:r2024a -batch rand
```
### Run MATLAB with Startup Options
To override the default behavior of the container and run MATLAB with any set of arguments, such as `-logfile`, execute:
```bash
docker run --init -it --rm matlab:r2023b -logfile "logfilename.log"
docker run --init -it --rm matlab:r2024a -logfile "logfilename.log"
```
To learn more, see the documentation: [Commonly Used Startup Options](https://www.mathworks.com/help/matlab/matlab_env/commonly-used-startup-options.html).
Expand All @@ -192,7 +192,7 @@ For some workflows and toolboxes, you must specify dependencies. You must do thi
* Use the MATLAB Engine API for C and Fortran®.
* Use the Polyspace® 32-bit tcc compiler.
The [matlab-deps repository](https://github.com/mathworks-ref-arch/container-images/tree/main/matlab-deps) repository lists Dockerfiles for various releases and platforms. To view the Dockerfile for R2023b, click [here](https://github.com/mathworks-ref-arch/container-images/blob/main/matlab-deps/r2023b/ubuntu22.04/Dockerfile).
The [matlab-deps repository](https://github.com/mathworks-ref-arch/container-images/tree/main/matlab-deps) repository lists Dockerfiles for various releases and platforms. To view the Dockerfile for R2024a, click [here](https://github.com/mathworks-ref-arch/container-images/blob/main/matlab-deps/r2024a/ubuntu22.04/Dockerfile).
These Dockerfiles contain commented lines with the libraries that support these additional capabilities. Copy and uncomment these lines into your Dockerfile.
Expand Down
6 changes: 3 additions & 3 deletions alternates/building-on-matlab-docker-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright 2023 The MathWorks, Inc.
# Copyright 2023-2024 The MathWorks, Inc.

# To specify which MATLAB release to install in the container, edit the value of the MATLAB_RELEASE argument.
# Use lower case to specify the release, for example: ARG MATLAB_RELEASE=r2021b
ARG MATLAB_RELEASE=r2023b
ARG MATLAB_RELEASE=r2024a

# Specify the extra products to install into the image. These products can either be toolboxes or support packages.
ARG ADDITIONAL_PRODUCTS="Symbolic_Math_Toolbox Deep_Learning_Toolbox_Model_for_ResNet-50_Network"
Expand Down Expand Up @@ -47,7 +47,7 @@ RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
--release=${MATLAB_RELEASE} \
--products ${ADDITIONAL_PRODUCTS} \
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) \
&& sudo rm -f mpm /tmp/mathworks_root.log
&& sudo rm -rf mpm /tmp/mathworks_root.log ${HOME}/.MathWorks

# When running the container a license file can be mounted,
# or a license server can be provided as an environment variable.
Expand Down
14 changes: 7 additions & 7 deletions alternates/building-on-matlab-docker-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ cd matlab-dockerfile/alternates/building-on-matlab-docker-image
### Quick start
Build a container with a name and tag.
```bash
docker build -t matlab_with_add_ons:r2023b .
docker build -t matlab_with_add_ons:r2024a .
```

You can then run the container with the "batch" option. Test the container by running an example MATLAB command such as `ver` to display the installed toolboxes.
```bash
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab_with_add_ons:r2023b -batch ver
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab_with_add_ons:r2024a -batch ver
```
You can check the installed support packages using the MATLAB command `matlabshared.supportpkg.getInstalled`.

You can also run the container with the "browser" option to access MATLAB in a browser.
```bash
docker run --init --rm -it -p 8888:8888 matlab_with_add_ons:r2023b -browser
docker run --init --rm -it -p 8888:8888 matlab_with_add_ons:r2024a -browser
```
For more information, see [Run the Container](#run-the-container).

Expand All @@ -51,7 +51,7 @@ The `ADDITIONAL_PRODUCTS` argument must be a space separated list surrounded by
By default, `ADDITIONAL_PRODUCTS` includes example products, which you can replace.
For example, to build an image containing MATLAB and the Deep Learning Toolbox™:
```bash
docker build --build-arg ADDITIONAL_PRODUCTS="Deep_Learning_Toolbox" -t matlab_with_add_ons:r2023b .
docker build --build-arg ADDITIONAL_PRODUCTS="Deep_Learning_Toolbox" -t matlab_with_add_ons:r2024a .
```

For a successful build, include at least one product.
Expand All @@ -67,7 +67,7 @@ The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/ma

| Argument Name | Default value | Effect |
|---|---|---|
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | r2023b | The MATLAB release to install. Must be lower-case, for example: `r2020b`.|
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | r2024a | The MATLAB release to install. Must be lower-case, for example: `r2020b`.|
| [ADDITIONAL_PRODUCTS](#customize-products-to-install-using-matlab-package-manager-mpm) | "Symbolic_Math_Toolbox Deep_Learning_Toolbox_Model_for_ResNet-50_Network" | A space separated list of toolboxes and support packages to install. For more details, see [MATLAB Package Manager](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md)|
| [LICENSE_SERVER](#build-an-image-with-license-server-information) | *unset* | The port and hostname of a machine that is running a Network License Manager, using the `port@hostname` syntax. For example: `27000@MyServerName`. To use this build argument, the corresponding lines must be uncommented in the Dockerfile. |

Expand Down Expand Up @@ -95,12 +95,12 @@ server or browser mode will not start successfully.

Build container with the License Server.
```bash
docker build -t matlab_with_add_ons:r2023b --build-arg LICENSE_SERVER=27000@MyServerName .
docker build -t matlab_with_add_ons:r2024a --build-arg LICENSE_SERVER=27000@MyServerName .
```

Run the container, without needing to pass license information.
```bash
docker run --init matlab_with_add_ons:r2023b -batch ver
docker run --init matlab_with_add_ons:r2024a -batch ver
```
## Run the Container
The Docker container you build using this Dockerfile inherits run options from its base image.
Expand Down
4 changes: 2 additions & 2 deletions alternates/matlab-installer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright 2023 The MathWorks, Inc.
# Copyright 2023-2024 The MathWorks, Inc.

# To specify which MATLAB release you wish to install in the container, edit the value of the MATLAB_RELEASE argument.
# Use lower case to specify the release.
ARG MATLAB_RELEASE=r2023b
ARG MATLAB_RELEASE=r2024a

FROM ubuntu as versioner

Expand Down
2 changes: 1 addition & 1 deletion alternates/matlab-installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/ma

| Argument Name | Default value | Effect |
| ------------------------------------------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | latest | The MATLAB release you want to install. Must be lower-case, for example: `r2023b`. |
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | latest | The MATLAB release you want to install. Must be lower-case, for example: `r2024a`. |
| [LICENSE_SERVER](#build-an-image-with-license-server-information) | _unset_ | The port and hostname of the machine running the Network License Manager, using the `port@hostname` syntax. For example: `27000@MyServerName` |

Use these arguments with the `docker build` command to customize your image. Run a command from the `alternates/matlab-installer` of the cloned repository of the form:
Expand Down
8 changes: 4 additions & 4 deletions alternates/non-interactive/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# version of MATLAB, list of products to install, and the location at which to install MATLAB.

# Here is an example docker build command with the optional build arguments.
# docker build --build-arg MATLAB_RELEASE=r2023b
# docker build --build-arg MATLAB_RELEASE=r2024a
# --build-arg MATLAB_PRODUCT_LIST="MATLAB Deep_Learning_Toolbox Symbolic_Math_Toolbox"
# --build-arg MATLAB_INSTALL_LOCATION="/opt/matlab/R2023b"
# --build-arg MATLAB_INSTALL_LOCATION="/opt/matlab/R2024a"
# -t my_matlab_image_name .

# To specify which MATLAB release to install in the container, edit the value of the MATLAB_RELEASE argument.
# Use lowercase to specify the release, for example: ARG MATLAB_RELEASE=r2021b
ARG MATLAB_RELEASE=r2023b
ARG MATLAB_RELEASE=r2024a

# Specify the list of products to install into MATLAB.
ARG MATLAB_PRODUCT_LIST="MATLAB"
Expand Down Expand Up @@ -58,7 +58,7 @@ RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \
--destination=${MATLAB_INSTALL_LOCATION} \
--products ${MATLAB_PRODUCT_LIST} \
|| (echo "MPM Installation Failure. See below for more information:" && cat /tmp/mathworks_root.log && false) \
&& sudo rm -f mpm /tmp/mathworks_root.log \
&& sudo rm -rf mpm /tmp/mathworks_root.log ${HOME}/.MathWorks \
&& sudo ln -s ${MATLAB_INSTALL_LOCATION}/bin/matlab /usr/local/bin/matlab

# Install matlab-batch to enable the use of MATLAB batch licensing tokens.
Expand Down
2 changes: 1 addition & 1 deletion alternates/non-interactive/MATLAB-BATCH.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ For support, contact [MathWorks Technical Support](https://www.mathworks.com/sup

### v2024.02.0

- **Added:** Support for MATLAB R2024a prerelease.
- **Added:** Support for MATLAB R2024a.
- **Added:** Notifications when tokens are close to expiring.
- **Added:** File details (including application version) integrated with Windows Explorer.
- **Fixed:** **matlab-batch** supports Parallel Computing workflows.
Expand Down
Loading

0 comments on commit 31b2d96

Please sign in to comment.