diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml index de871e0..4dbdc95 100644 --- a/.github/workflows/build-test-publish.yml +++ b/.github/workflows/build-test-publish.yml @@ -28,7 +28,16 @@ jobs: strategy: fail-fast: false matrix: - matlab-release: [R2024a, R2023b, R2023a, R2022b, R2022a, R2021b, R2021a, R2020b] + matlab-release: + - R2024b + - R2024a + - R2023b + - R2023a + - R2022b + - R2022a + - R2021b + - R2021a + - R2020b steps: - name: Checkout repo @@ -65,7 +74,7 @@ jobs: if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi - name: Generate license file - run: echo '${{ secrets.MATLAB_LICENSE_FILE_R2024A }}' > ${{ env.LICENSE_FILE_PATH }} + run: echo '${{ secrets.MATLAB_LICENSE_FILE_R2024B }}' > ${{ env.LICENSE_FILE_PATH }} - name: Test container env: diff --git a/.github/workflows/from-matlab-docker-build-test.yml b/.github/workflows/from-matlab-docker-build-test.yml index 31d5eb2..8e2f200 100644 --- a/.github/workflows/from-matlab-docker-build-test.yml +++ b/.github/workflows/from-matlab-docker-build-test.yml @@ -29,7 +29,13 @@ jobs: strategy: fail-fast: false matrix: - matlab-release: [R2024a, R2023b, R2023a, R2022b, R2022a] + matlab-release: + - R2024b + - R2024a + - R2023b + - R2023a + - R2022b + - R2022a steps: - name: Checkout repo @@ -60,7 +66,7 @@ jobs: if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi - name: Generate license file - run: echo '${{ secrets.MATLAB_LICENSE_FILE_R2024A }}' > ${{ env.LICENSE_FILE_PATH }} + run: echo '${{ secrets.MATLAB_LICENSE_FILE_R2024B }}' > ${{ env.LICENSE_FILE_PATH }} - name: Test container working-directory: tests diff --git a/.github/workflows/matlab-container-offline-install-build-test.yml b/.github/workflows/matlab-container-offline-install-build-test.yml index 3e1de03..bb896e1 100644 --- a/.github/workflows/matlab-container-offline-install-build-test.yml +++ b/.github/workflows/matlab-container-offline-install-build-test.yml @@ -25,14 +25,23 @@ env: ALT_PATH: alternates/matlab-container-offline-install MATLAB_PRODUCT_LIST: "MATLAB Symbolic_Math_Toolbox Deep_Learning_Toolbox_Model_for_ResNet-50_Network" LICENSE_FILE_PATH: ${{ github.workspace }}/license.lic - + jobs: build-test-image: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - matlab-release: [R2024a, R2023b, R2023a, R2022b, R2022a, R2021b, R2021a, R2020b] + matlab-release: + - R2024b + - R2024a + - R2023b + - R2023a + - R2022b + - R2022a + - R2021b + - R2021a + - R2020b steps: - name: Checkout repo @@ -80,9 +89,8 @@ jobs: python -m pip install --upgrade pip if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi - - name: Generate license file - run: echo '${{ secrets.MATLAB_LICENSE_FILE_R2024A }}' > ${{ env.LICENSE_FILE_PATH }} + run: echo '${{ secrets.MATLAB_LICENSE_FILE_R2024B }}' > ${{ env.LICENSE_FILE_PATH }} - name: Test container working-directory: tests diff --git a/.github/workflows/matlab-installer-build-test.yml b/.github/workflows/matlab-installer-build-test.yml index 6c9fb31..0f7b048 100644 --- a/.github/workflows/matlab-installer-build-test.yml +++ b/.github/workflows/matlab-installer-build-test.yml @@ -31,7 +31,16 @@ jobs: strategy: fail-fast: false matrix: - matlab-release: [R2024a, R2023b, R2023a, R2022b, R2022a, R2021b, R2021a, R2020b] + matlab-release: + - R2024b + - R2024a + - R2023b + - R2023a + - R2022b + - R2022a + - R2021b + - R2021a + - R2020b steps: - name: Checkout repo diff --git a/.github/workflows/non-interactive-build-test.yml b/.github/workflows/non-interactive-build-test.yml index ee6dc3f..45fe8b7 100644 --- a/.github/workflows/non-interactive-build-test.yml +++ b/.github/workflows/non-interactive-build-test.yml @@ -29,7 +29,15 @@ jobs: fail-fast: false matrix: matlab-release: - [R2024a, R2023b, R2023a, R2022b, R2022a, R2021b, R2021a, R2020b] + - R2024b + - R2024a + - R2023b + - R2023a + - R2022b + - R2022a + - R2021b + - R2021a + - R2020b steps: - name: Checkout repo diff --git a/Dockerfile b/Dockerfile index 5fc10e0..7847a1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,18 @@ # 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 +# 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=R2024a +# docker build --build-arg MATLAB_RELEASE=R2024b # --build-arg MATLAB_PRODUCT_LIST="MATLAB Deep_Learning_Toolbox Symbolic_Math_Toolbox" -# --build-arg MATLAB_INSTALL_LOCATION="/opt/matlab/R2024a" -# --build-arg LICENSE_SERVER=12345@hostname.com +# --build-arg MATLAB_INSTALL_LOCATION="/opt/matlab/R2024b" +# --build-arg LICENSE_SERVER=12345@hostname.com # -t my_matlab_image_name . # To specify which MATLAB release to install in the container, edit the value of the MATLAB_RELEASE argument. # Use uppercase to specify the release, for example: ARG MATLAB_RELEASE=R2021b -ARG MATLAB_RELEASE=R2024a +ARG MATLAB_RELEASE=R2024b # Specify the list of products to install into MATLAB. ARG MATLAB_PRODUCT_LIST="MATLAB" @@ -20,7 +20,7 @@ ARG MATLAB_PRODUCT_LIST="MATLAB" # Specify MATLAB Install Location. ARG MATLAB_INSTALL_LOCATION="/opt/matlab/${MATLAB_RELEASE}" -# Specify license server information using the format: port@hostname +# Specify license server information using the format: port@hostname ARG LICENSE_SERVER # When you start the build stage, this Dockerfile by default uses the Ubuntu-based matlab-deps image. @@ -55,7 +55,7 @@ WORKDIR /home/matlab # Run mpm to install MATLAB in the target location and delete the mpm installation afterwards. # If mpm fails to install successfully, then print the logfile in the terminal, otherwise clean up. # Pass in $HOME variable to install support packages into the user's HOME folder. -RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \ +RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \ && chmod +x mpm \ && sudo HOME=${HOME} ./mpm install \ --release=${MATLAB_RELEASE} \ @@ -69,8 +69,8 @@ RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \ # Option 1. Specify the host and port of the machine that serves the network licenses # if you want to store the license information in an environment variable. This -# is the preferred option. You can either use a build variable, like this: -# --build-arg LICENSE_SERVER=27000@MyServerName or you can specify the license server +# is the preferred option. You can either use a build variable, like this: +# --build-arg LICENSE_SERVER=27000@MyServerName or you can specify the license server # directly using: ENV MLM_LICENSE_FILE=27000@flexlm-server-name ENV MLM_LICENSE_FILE=$LICENSE_SERVER @@ -78,11 +78,11 @@ ENV MLM_LICENSE_FILE=$LICENSE_SERVER # Enter the details of the license server in this file and uncomment the following line. # COPY network.lic ${MATLAB_INSTALL_LOCATION}/licenses/ -# The following environment variables allow MathWorks to understand how this MathWorks -# product (MATLAB Dockerfile) is being used. This information helps us make MATLAB even better. -# Your content, and information about the content within your files, is not shared with MathWorks. -# To opt out of this service, delete the environment variables defined in the following line. -# To learn more, see the Help Make MATLAB Even Better section in the accompanying README: +# The following environment variables allow MathWorks to understand how this MathWorks +# product (MATLAB Dockerfile) is being used. This information helps us make MATLAB even better. +# Your content, and information about the content within your files, is not shared with MathWorks. +# To opt out of this service, delete the environment variables defined in the following line. +# To learn more, see the Help Make MATLAB Even Better section in the accompanying README: # https://github.com/mathworks-ref-arch/matlab-dockerfile#help-make-matlab-even-better ENV MW_DDUX_FORCE_ENABLE=true MW_CONTEXT_TAGS=MATLAB:DOCKERFILE:V1 diff --git a/README.md b/README.md index f0505d5..49d9c86 100644 --- a/README.md +++ b/README.md @@ -36,14 +36,14 @@ cd matlab-dockerfile Build container with a name and tag of your choice. ```bash -docker build -t matlab:R2024a . +docker build -t matlab:R2024b . ``` 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:R2024a -batch ver +docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:R2024b -batch ver ``` -The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) defaults to building a container for MATLAB R2024a. +The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) defaults to building a container for MATLAB R2024b. 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). @@ -66,9 +66,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) | R2024a | The MATLAB release you want to install, in lower-case. For example: `R2019b`| +| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | R2024b | 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/R2024a | The path to install MATLAB. | +| [MATLAB_INSTALL_LOCATION](#build-an-image-with-matlab-installed-to-a-specific-location) | /opt/matlab/R2024b | The path to install MATLAB. | | [LICENSE_SERVER](#build-an-image-configured-to-use-a-license-server) | *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. @@ -83,13 +83,13 @@ 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:R2024a . +docker build --build-arg MATLAB_PRODUCT_LIST='MATLAB Simulink' -t matlab:R2024b . ``` #### 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:R2024a . +docker build --build-arg MATLAB_INSTALL_LOCATION='/opt/matlab' -t matlab:R2024b . ``` #### Build an Image Configured to Use a License Server @@ -97,10 +97,10 @@ docker build --build-arg MATLAB_INSTALL_LOCATION='/opt/matlab' -t matlab:R2024a 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:R2024a . +docker build --build-arg LICENSE_SERVER=27000@MyServerName -t matlab:R2024b . # Run the container, without needing to pass license information. -docker run --init --rm matlab:R2024a -batch ver +docker run --init --rm matlab:R2024b -batch ver ``` ## Use the Network License Manager @@ -133,7 +133,7 @@ With the `docker build` command, either: ```bash # Example - docker build -t matlab:R2024a --build-arg LICENSE_SERVER=27000@MyServerName . + docker build -t matlab:R2024b --build-arg LICENSE_SERVER=27000@MyServerName . ``` - Use the `network.lic` file: 1. Place the `network.lic` file in the same folder as the Dockerfile. @@ -142,13 +142,13 @@ With the `docker build` command, either: ```bash # Example - docker build -t matlab:R2024a . + docker build -t matlab:R2024b . ``` 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:R2024a -batch ver +docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:R2024b -batch ver ``` ## Run the Container @@ -156,7 +156,7 @@ If you did not provide the license server information when building the image, t ```bash # Start MATLAB, print version information, and exit: -docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:R2024a -batch ver +docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:R2024b -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. @@ -164,19 +164,19 @@ You can run the container **without** specifying `MLM_LICENSE_FILE` if you provi ### 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:R2024a +docker run --init -it --rm matlab:R2024b ``` ### 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:R2024a -batch rand +docker run --init --rm matlab:R2024b -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:R2024a -logfile "logfilename.log" +docker run --init -it --rm matlab:R2024b -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). @@ -194,7 +194,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 R2024a, click [here](https://github.com/mathworks-ref-arch/container-images/blob/main/matlab-deps/r2024a/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 R2024b, click [here](https://github.com/mathworks-ref-arch/container-images/blob/main/matlab-deps/r2024b/ubuntu22.04/Dockerfile). These Dockerfiles contain commented lines with the libraries that support these additional capabilities. Copy and uncomment these lines into your Dockerfile. diff --git a/alternates/building-on-matlab-docker-image/Dockerfile b/alternates/building-on-matlab-docker-image/Dockerfile index 24d8c77..3568ab7 100755 --- a/alternates/building-on-matlab-docker-image/Dockerfile +++ b/alternates/building-on-matlab-docker-image/Dockerfile @@ -2,7 +2,7 @@ # To specify which MATLAB release to install in the container, edit the value of the MATLAB_RELEASE argument. # Use uppercase to specify the release, for example: ARG MATLAB_RELEASE=R2021b -ARG MATLAB_RELEASE=R2024a +ARG MATLAB_RELEASE=R2024b # 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" @@ -22,8 +22,8 @@ USER root RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update \ && apt-get install --no-install-recommends --yes \ - wget \ - ca-certificates \ + wget \ + ca-certificates \ && apt-get clean \ && apt-get autoremove \ && rm -rf /var/lib/apt/lists/* @@ -54,7 +54,7 @@ RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \ # Alternatively, you can provide a license server to use # with the docker image while building the image. -# Specify the host and port of the machine that serves the network licenses +# Specify the host and port of the machine that serves the network licenses # if you want to bind in the license info as an environment variable. # You can also build with something like --build-arg LICENSE_SERVER=27000@MyServerName, # in which case you should uncomment the following two lines. @@ -63,11 +63,11 @@ RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \ # ARG LICENSE_SERVER # ENV MLM_LICENSE_FILE=$LICENSE_SERVER -# The following environment variables allow MathWorks to understand how this MathWorks -# product is being used. This information helps us make MATLAB even better. -# Your content, and information about the content within your files, is not shared with MathWorks. +# The following environment variables allow MathWorks to understand how this MathWorks +# product is being used. This information helps us make MATLAB even better. +# Your content, and information about the content within your files, is not shared with MathWorks. # To opt out of this service, delete the environment variables defined in the following line. -# See the Help Make MATLAB Even Better section in the accompanying README to learn more: +# See the Help Make MATLAB Even Better section in the accompanying README to learn more: # https://github.com/mathworks-ref-arch/matlab-dockerfile#help-make-matlab-even-better ENV MW_DDUX_FORCE_ENABLE=true MW_CONTEXT_TAGS=$MW_CONTEXT_TAGS,MATLAB:TOOLBOXES:DOCKERFILE:V1 diff --git a/alternates/building-on-matlab-docker-image/README.md b/alternates/building-on-matlab-docker-image/README.md index 967cef5..37accd3 100644 --- a/alternates/building-on-matlab-docker-image/README.md +++ b/alternates/building-on-matlab-docker-image/README.md @@ -13,7 +13,7 @@ For details of the features in that image, see [MATLAB Container Image on Docker ## Build Instructions ### Get the Dockerfile - + Access this Dockerfile either by directly downloading this repository from GitHub®, or by cloning this repository and then navigating to the appropriate subfolder. @@ -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:R2024a . +docker build -t matlab_with_add_ons:R2024b . ``` 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:R2024a -batch ver +docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab_with_add_ons:R2024b -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:R2024a -browser +docker run --init --rm -it -p 8888:8888 matlab_with_add_ons:R2024b -browser ``` For more information, see [Run the Container](#run-the-container). @@ -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:R2024a . +docker build --build-arg ADDITIONAL_PRODUCTS="Deep_Learning_Toolbox" -t matlab_with_add_ons:R2024b . ``` For a successful build, include at least one product. @@ -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) | R2024a | The MATLAB release to install. Must be lower-case, for example: `R2020b`.| +| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | R2024b | 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. | @@ -95,19 +95,19 @@ server or browser mode will not start successfully. Build container with the License Server. ```bash -docker build -t matlab_with_add_ons:R2024a --build-arg LICENSE_SERVER=27000@MyServerName . +docker build -t matlab_with_add_ons:R2024b --build-arg LICENSE_SERVER=27000@MyServerName . ``` Run the container, without needing to pass license information. ```bash -docker run --init matlab_with_add_ons:R2024a -batch ver +docker run --init matlab_with_add_ons:R2024b -batch ver ``` ## Run the Container The Docker container you build using this Dockerfile inherits run options from its base image. See the documentation for the base image, [MATLAB Container Image on Docker Hub](https://hub.docker.com/r/mathworks/matlab) (hosted on Docker Hub) for instructions on how to use those features, which include interacting with MATLAB using a web browser, batch mode, or an interactive command prompt, as well as how to provide license information when running the container. -Run the commands described there with the name of the Docker image that you build using this Dockerfile. +Run the commands described there with the name of the Docker image that you build using this Dockerfile. ## More MATLAB Docker Resources For more MATLAB Docker resources, see [More MATLAB Docker Resources](https://github.com/mathworks-ref-arch/matlab-dockerfile#more-matlab-docker-resources). diff --git a/alternates/matlab-container-offline-install/Dockerfile b/alternates/matlab-container-offline-install/Dockerfile index df83b89..76212ef 100644 --- a/alternates/matlab-container-offline-install/Dockerfile +++ b/alternates/matlab-container-offline-install/Dockerfile @@ -1,17 +1,17 @@ # Copyright 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 +# 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=R2024a +# docker build --build-arg MATLAB_RELEASE=R2024b # --build-arg MATLAB_PRODUCT_LIST="MATLAB Deep_Learning_Toolbox Symbolic_Math_Toolbox" -# --build-arg MATLAB_INSTALL_LOCATION="/opt/matlab/R2024a" +# --build-arg MATLAB_INSTALL_LOCATION="/opt/matlab/R2024b" # -t my_matlab_image_name . # To specify which MATLAB release to install in the container, edit the value of the MATLAB_RELEASE argument. # Use uppercase to specify the release, for example: ARG MATLAB_RELEASE=R2021b -ARG MATLAB_RELEASE=R2024a +ARG MATLAB_RELEASE=R2024b # Specify the list of products to install into MATLAB. ARG MATLAB_PRODUCT_LIST="MATLAB" @@ -22,7 +22,7 @@ ARG MATLAB_INSTALL_LOCATION="/opt/matlab/${MATLAB_RELEASE}" # Specify the archive image containing the installation files ARG ARCHIVE_BASE_IMAGE="mpm-archive:${MATLAB_RELEASE}" -# Specify license server information using the format: port@hostname +# Specify license server information using the format: port@hostname ARG LICENSE_SERVER # Specify the archive base image as a stage to allow it to be mounted in a later stage @@ -58,13 +58,13 @@ RUN --mount=type=bind,from=archive,source=/,target=/mpm-download/ \ && sudo rm -rf /tmp/mathworks_root.log \ && 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. # Option 1. Specify the host and port of the machine that serves the network licenses # if you want to store the license information in an environment variable. This -# is the preferred option. You can either use a build variable, like this: -# --build-arg LICENSE_SERVER=27000@MyServerName or you can specify the license server +# is the preferred option. You can either use a build variable, like this: +# --build-arg LICENSE_SERVER=27000@MyServerName or you can specify the license server # directly using: ENV MLM_LICENSE_FILE=27000@flexlm-server-name ENV MLM_LICENSE_FILE=$LICENSE_SERVER @@ -72,11 +72,11 @@ ENV MLM_LICENSE_FILE=$LICENSE_SERVER # Enter the details of the license server in this file and uncomment the following line. # COPY network.lic ${MATLAB_INSTALL_LOCATION}/licenses/ -# The following environment variables allow MathWorks to understand how this MathWorks -# product is being used. This information helps us make MATLAB even better. -# Your content, and information about the content within your files, is not shared with MathWorks. +# The following environment variables allow MathWorks to understand how this MathWorks +# product is being used. This information helps us make MATLAB even better. +# Your content, and information about the content within your files, is not shared with MathWorks. # To opt out of this service, delete the environment variables defined in the following line. -# See the Help Make MATLAB Even Better section in the accompanying README to learn more: +# See the Help Make MATLAB Even Better section in the accompanying README to learn more: # https://github.com/mathworks-ref-arch/matlab-dockerfile/alternates/matlab-container-offline-install#help-make-matlab-even-better ENV MW_DDUX_FORCE_ENABLE=true MW_CONTEXT_TAGS=$MW_CONTEXT_TAGS,MATLAB:FROM_SOURCE:DOCKERFILE:V1 diff --git a/alternates/matlab-container-offline-install/README.md b/alternates/matlab-container-offline-install/README.md index 238f585..78167a5 100644 --- a/alternates/matlab-container-offline-install/README.md +++ b/alternates/matlab-container-offline-install/README.md @@ -14,19 +14,19 @@ The solution uses two Docker images. The first image (archive image) contains th ### Get the Dockerfiles Access the Dockerfiles either by directly downloading this repository from GitHub®, or by cloning this repository and then navigating to the appropriate subfolder. You must have a working internet connection to perform this action. - + ```bash git clone https://github.com/mathworks-ref-arch/matlab-dockerfile.git cd matlab-dockerfile/alternates/matlab-container-offline-install ``` ### Build the Archive Docker Image -> :warning: Note: You must run this step in an online environment. +> :warning: Note: You must run this step in an online environment. -You can then store the generated Docker build and copy it to the offline or air-gapped environment for the next step. +You can then store the generated Docker build and copy it to the offline or air-gapped environment for the next step. Build the archive image with a name and tag. ```bash -docker build -t mpm-archive:R2024a -f archive.Dockerfile . +docker build -t mpm-archive:R2024b -f archive.Dockerfile . ``` By default, the [archive.Dockerfile](archive.Dockerfile) downloads the latest available MATLAB release without any additional toolboxes or products. @@ -41,7 +41,7 @@ To run this step in an offline or air-gapped environment, you need: Build a container with a name and tag. ```bash -DOCKER_BUILDKIT=1 docker build -t matlab-from-source:R2024a . +DOCKER_BUILDKIT=1 docker build -t matlab-from-source:R2024b . ``` To customize the build of the product image, refer to [Customize the Product Docker Image](#customize-the-product-docker-image). @@ -54,7 +54,7 @@ The [archive.Dockerfile](archive.Dockerfile) supports the following Docker build | Argument Name | Default value | Effect | |---|---|---| -| [MATLAB_RELEASE](#build-an-archive-image-for-a-different-release-of-matlab) | R2024a | The MATLAB release you want to install, in lower-case. For example: `R2022a` | +| [MATLAB_RELEASE](#build-an-archive-image-for-a-different-release-of-matlab) | R2024b | The MATLAB release you want to install, in lower-case. For example: `R2022a` | | [MATLAB_PRODUCT_LIST](#build-an-archive-image-with-a-specific-set-of-products) | MATLAB | Products to install as a space-separated list. For more information, see [MPM.md](../../MPM.md). For example: `MATLAB Simulink Deep_Learning_Toolbox Fixed-Point_Designer` | Use these arguments with the `docker build` command to customize your image. @@ -71,7 +71,7 @@ docker build --build-arg MATLAB_RELEASE=R2023b -t mpm-archive:R2023b -f archive. For example, to build an image with MATLAB and the Statistics and Machine Learning Toolbox™ installation files, use this command. ```bash -docker build --build-arg MATLAB_PRODUCT_LIST="MATLAB Statistics_and_Machine_Learning_Toolbox" -t mpm-archive:R2024a -f archive.Dockerfile . +docker build --build-arg MATLAB_PRODUCT_LIST="MATLAB Statistics_and_Machine_Learning_Toolbox" -t mpm-archive:R2024b -f archive.Dockerfile . ``` ### Customize the Product Docker Image @@ -79,10 +79,10 @@ The [Dockerfile](Dockerfile) supports the following Docker build-time variables: | Argument Name | Default value | Effect | |---|---|---| -| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | R2024a | The MATLAB release you want to install, in lower-case. For example: `R2022a`. :warning: This release must match the `MATLAB_RELEASE` you use to build the archive image. | +| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | R2024b | The MATLAB release you want to install, in lower-case. For example: `R2022a`. :warning: This release must match the `MATLAB_RELEASE` you use to build the archive image. | | [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](../../MPM.md). For example: `MATLAB Simulink Deep_Learning_Toolbox Fixed-Point_Designer`. The list of products to install must be a subset of the installation files available in the archive image. | -| [MATLAB_INSTALL_LOCATION](#build-an-image-with-matlab-installed-to-a-specific-location) | /opt/matlab/R2024a | The path to install MATLAB. | -| [ARCHIVE_BASE_IMAGE](#build-an-image-from-a-different-archive) | mpm-archive:R2024a | The name of the Docker® image containing the product installation files. | +| [MATLAB_INSTALL_LOCATION](#build-an-image-with-matlab-installed-to-a-specific-location) | /opt/matlab/R2024b | The path to install MATLAB. | +| [ARCHIVE_BASE_IMAGE](#build-an-image-from-a-different-archive) | mpm-archive:R2024b | The name of the Docker® image containing the product installation files. | | [LICENSE_SERVER](#build-an-image-configured-to-use-a-license-server) | *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 `docker build` command to customize your image. @@ -101,21 +101,21 @@ Ensure that the release of the archive base image you set in `ARCHIVE_BASE_IMAGE For example, to build an image with MATLAB and the Statistics and Machine Learning Toolbox, use this command. ```bash -docker build --build-arg MATLAB_PRODUCT_LIST="MATLAB Statistics_and_Machine_Learning_Toolbox" -t matlab-stats-from-source:R2024a . +docker build --build-arg MATLAB_PRODUCT_LIST="MATLAB Statistics_and_Machine_Learning_Toolbox" -t matlab-stats-from-source:R2024b . ``` ### 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-from-source:R2024a . +docker build --build-arg MATLAB_INSTALL_LOCATION="/opt/matlab" -t matlab-from-source:R2024b . ``` ### Build an Image from a Different Archive For example, to build an image using a different archive image, use the following command. ```bash -docker build --build-arg ARCHIVE_BASE_IMAGE=my-archive -t matlab-from-source:R2024a . +docker build --build-arg ARCHIVE_BASE_IMAGE=my-archive -t matlab-from-source:R2024b . ``` #### Build an Image Configured to Use a License Server @@ -123,10 +123,10 @@ docker build --build-arg ARCHIVE_BASE_IMAGE=my-archive -t matlab-from-source:R2 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-from-source:R2024a . +docker build --build-arg LICENSE_SERVER=27000@MyServerName -t matlab-from-source:R2024b . # Run the container, without needing to pass license information. -docker run --init --rm matlab-from-source:R2024a -batch ver +docker run --init --rm matlab-from-source:R2024b -batch ver ``` For more information, see [Use the Network License Manager](../../README.md#use-the-network-license-manager). diff --git a/alternates/matlab-container-offline-install/archive.Dockerfile b/alternates/matlab-container-offline-install/archive.Dockerfile index a314107..f5627bf 100644 --- a/alternates/matlab-container-offline-install/archive.Dockerfile +++ b/alternates/matlab-container-offline-install/archive.Dockerfile @@ -1,19 +1,19 @@ # Copyright 2024 The MathWorks, Inc. # Here is an example docker build command with the optional build arguments. -# docker build --build-arg MATLAB_RELEASE=R2024a +# docker build --build-arg MATLAB_RELEASE=R2024b # --build-arg MATLAB_PRODUCT_LIST="MATLAB Deep_Learning_Toolbox Symbolic_Math_Toolbox" # -f archive.Dockerfile # -t mpm-archive . # To specify which MATLAB release to install in the container, edit the value of the MATLAB_RELEASE argument. # Use uppercase to specify the release, for example: ARG MATLAB_RELEASE=R2021b -ARG MATLAB_RELEASE=R2024a +ARG MATLAB_RELEASE=R2024b # Specify the list of products to install into MATLAB. ARG MATLAB_PRODUCT_LIST="MATLAB" -# The staging location used to store the downloaded mpm archives +# The staging location used to store the downloaded mpm archives ARG MPM_DOWNLOAD_DESTINATION="/usr/local/src" # Download MPM and installation files in a mathworks/matlab-deps Docker image @@ -37,7 +37,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Run mpm to install MATLAB in the target location. # If mpm fails to install successfully, then print the logfile in the terminal, otherwise clean up. -RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \ +RUN wget -q https://www.mathworks.com/mpm/glnxa64/mpm \ && chmod +x mpm \ && ./mpm download \ --release=${MATLAB_RELEASE} \ diff --git a/alternates/matlab-installer/Dockerfile b/alternates/matlab-installer/Dockerfile index 0993976..c4c15a3 100644 --- a/alternates/matlab-installer/Dockerfile +++ b/alternates/matlab-installer/Dockerfile @@ -2,7 +2,7 @@ # 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=r2024a +ARG MATLAB_RELEASE=r2024b FROM ubuntu as versioner @@ -76,12 +76,13 @@ RUN sed -i 's/# destinationFolder=$/destinationFolder=\/usr\/local\/MATLAB/' /ma # Now install MATLAB RUN cd /matlab-install \ && chmod +x ./install \ - && ./install -mode silent \ - -inputFile /matlab_installer_input.txt \ + && ./install \ + -mode silent \ + -inputFile /matlab_installer_input.txt \ && if ! [ -f /usr/local/MATLAB/bin/matlab ]; then \ cat /tmp/install.log \ && echo "Installation failed and MATLAB was not installed. See the build log above for more information"; \ - exit 1; fi + exit 1; fi # If you did not specify a license server at build, comment these lines. RUN mkdir -p /usr/local/MATLAB/licenses \ diff --git a/alternates/matlab-installer/README.md b/alternates/matlab-installer/README.md index 65a99f7..2111271 100644 --- a/alternates/matlab-installer/README.md +++ b/alternates/matlab-installer/README.md @@ -21,17 +21,17 @@ git clone https://github.com/mathworks-ref-arch/matlab-dockerfile.git 3. Create a subfolder named `matlab-install` ## Step 2. Choose MATLAB Installation Method -To install MATLAB into the container image, choose a MATLAB installation method. You can either use MATLAB installation files or a MATLAB ISO image. +To install MATLAB into the container image, choose a MATLAB installation method. You can either use MATLAB installation files or a MATLAB ISO image. ### MATLAB Installation Files To obtain the installation files, you must be an administrator for the license linked with your MathWorks® account. 1. From the [MathWorks Downloads](https://www.mathworks.com/downloads/) page, select the desired version of MATLAB. 1. Download the Installer for Linux. -1. Follow the steps at [Download Products Without Installation](https://www.mathworks.com/help/install/ug/download-without-installing.html). -1. Specify the location of the `matlab-install` subfolder of the cloned repository as the path to the download folder. -1. Select the installation files for the Linux (64-bit) version of MATLAB. +1. Follow the steps at [Download Products Without Installation](https://www.mathworks.com/help/install/ug/download-without-installing.html). +1. Specify the location of the `matlab-install` subfolder of the cloned repository as the path to the download folder. +1. Select the installation files for the Linux (64-bit) version of MATLAB. 1. Select the products you want to install in the container image. -1. Confirm your selections and complete the download. +1. Confirm your selections and complete the download. 1. **(For releases after R2020a)** The installation files are automatically extracted into a subfolder with a date stamp. Move these up a level using the following command from the `matlab-installer` folder ```bash mv ./matlab-install/