Skip to content

Commit

Permalink
Support for R2024b.
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhakk-mw committed Sep 17, 2024
1 parent b9add72 commit d61d518
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 50 deletions.
11 changes: 6 additions & 5 deletions matlab-vnc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# on a base image of jupyter/base-notebook:python-3.xx

## Sample Build Command:
# 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 [email protected] \
# -t my_matlab_image_name .
Expand All @@ -15,6 +15,7 @@
# MATLAB RELEASE | Supported Python Versions | OS supported by matlab-deps|Supported by this Dockerfile |
# ---------------| (MATLAB Engine for Python) |----------------------------|---------------------------------|
# ---------------|----------------------------|----------------------------|---------------------------------|
# R2024b | 3.9, 3.10, 3.11, 3.12 | Ubuntu 20.04 & 22.04 | Yes |
# R2024a | 3.9, 3.10, 3.11 | Ubuntu 20.04 & 22.04 | Yes |
# R2023b | 3.9, 3.10, 3.11 | Ubuntu 20.04 & 22.04 | Yes |
# R2023a | 3.8, 3.9, 3.10 | Ubuntu 20.04 & 22.04 | Yes |
Expand All @@ -24,11 +25,11 @@
# R2021a | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile |
# R2020b | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile |

# Specify release of MATLAB to build. (use lowercase, default is r2024a)
ARG MATLAB_RELEASE=r2024a
# Specify release of MATLAB to build. (Default is R2024b)
ARG MATLAB_RELEASE=R2024b

# Specify version of python thats used by jupyter/base-notebbok
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024a, R2023b, R2023a & R2022b
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024b to R2022b
ARG PYTHON_VERSION=3.10

# Specify the list of products to install into MATLAB,
Expand Down Expand Up @@ -86,7 +87,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update \
xubuntu-icon-theme \
curl \
xscreensaver \
&& wget ${MATLAB_DEPS_REQUIREMENTS_FILE} -O ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} \
&& wget $(echo ${MATLAB_DEPS_REQUIREMENTS_FILE} | tr "[:upper:]" "[:lower:]") -O ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} \
&& xargs -a ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} -r apt-get install --no-install-recommends -y \
&& apt-get remove -y gnome-screensaver \
&& apt-get clean \
Expand Down
9 changes: 5 additions & 4 deletions matlab-vnc/Dockerfile.mounted
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Folder with the MATLAB installation needs to be mounted into the image at /opt/matlab

## Sample Build Command:
# docker build --build-arg MATLAB_RELEASE=r2024a \
# docker build --build-arg MATLAB_RELEASE=R2024b \
# --build-arg [email protected] \
# -t my_matlab_image_name .

Expand All @@ -14,6 +14,7 @@
# MATLAB RELEASE | Supported Python Versions | OS supported by matlab-deps|Supported by this Dockerfile |
# ---------------| (MATLAB Engine for Python) |----------------------------|---------------------------------|
# ---------------|----------------------------|----------------------------|---------------------------------|
# R2024b | 3.9, 3.10, 3.11, 3.12 | Ubuntu 20.04 & 22.04 | Yes |
# R2024a | 3.9, 3.10, 3.11 | Ubuntu 20.04 & 22.04 | Yes |
# R2023b | 3.9, 3.10, 3.11 | Ubuntu 20.04 & 22.04 | Yes |
# R2023a | 3.8, 3.9, 3.10 | Ubuntu 20.04 & 22.04 | Yes |
Expand All @@ -23,12 +24,12 @@
# R2021a | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile.mounted |
# R2020b | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile.mounted |

# Specify release of MATLAB being mounted. (use lowercase, default is r2024a)
# Specify release of MATLAB being mounted. (use lowercase, default is R2024b)
# Used to fetch & install MATLAB's s/w dependencies
ARG MATLAB_RELEASE=r2024a
ARG MATLAB_RELEASE=R2024b

# Specify version of python thats used by jupyter/base-notebbok
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024a, R2023b, R2023a & R2022b
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024b to R2022b
ARG PYTHON_VERSION=3.10

# Optional Network License Server information in the form of port@hostname
Expand Down
11 changes: 6 additions & 5 deletions matlab/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# For complete listing, see https://github.com/mathworks-ref-arch/container-images/tree/main/matlab-deps

## Sample Build Command:
# docker build --build-arg MATLAB_RELEASE=r2024a \
# docker build --build-arg MATLAB_RELEASE=r2024b \
# --build-arg PYTHON_VERSION=3.11 \
# --build-arg MATLAB_PRODUCT_LIST="MATLAB Deep_Learning_Toolbox Symbolic_Math_Toolbox"\
# --build-arg [email protected] \
Expand All @@ -19,6 +19,7 @@
# MATLAB RELEASE | Supported Python Versions | OS supported by matlab-deps|Supported by this Dockerfile |
# ---------------| (MATLAB Engine for Python) |----------------------------|---------------------------------|
# ---------------|----------------------------|----------------------------|---------------------------------|
# R2024b | 3.9, 3.10, 3.11, 3.12 | Ubuntu 22.04 & 20.04 | Yes |
# R2024a | 3.9, 3.10, 3.11 | Ubuntu 22.04 & 20.04 | Yes |
# R2023b | 3.9, 3.10, 3.11 | Ubuntu 22.04 & 20.04 | Yes |
# R2023a | 3.8, 3.9, 3.10 | Ubuntu 22.04 & 20.04 | Yes |
Expand All @@ -28,11 +29,11 @@
# R2021a | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile |
# R2020b | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile |

# Specify release of MATLAB to build. (use lowercase, default is r2024a)
ARG MATLAB_RELEASE=r2024a
# Specify release of MATLAB to build. (Default is R2024b)
ARG MATLAB_RELEASE=R2024b

# Specify version of python thats used by jupyter/base-notebbok
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024a, R2023b, R2023a & R2022b
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024b to R2022b.
ARG PYTHON_VERSION=3.10

# Specify the list of products to install into MATLAB,
Expand Down Expand Up @@ -82,7 +83,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update \
ca-certificates \
xvfb \
git \
&& wget ${MATLAB_DEPS_REQUIREMENTS_FILE} -O ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} \
&& wget $(echo ${MATLAB_DEPS_REQUIREMENTS_FILE} | tr "[:upper:]" "[:lower:]") -O ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} \
&& xargs -a ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} -r apt-get install --no-install-recommends -y \
&& apt-get clean \
&& apt-get -y autoremove \
Expand Down
13 changes: 7 additions & 6 deletions matlab/Dockerfile.byoi
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# For complete listing, see https://github.com/mathworks-ref-arch/container-images/tree/main/matlab-deps

## Sample Build Command:
# docker build --build-arg MATLAB_RELEASE=r2024a \
# docker build --build-arg MATLAB_RELEASE=R2024b \
# --build-arg PYTHON_VERSION=3.11 \
# --build-arg MATLAB_IMAGE_NAME=mathworks/matlab:r2024a \
# --build-arg MATLAB_IMAGE_NAME=mathworks/matlab:R2024b \
# --build-arg [email protected] \
# -t my_matlab_image_name -f Dockerfile.byoi .

Expand All @@ -19,6 +19,7 @@
# MATLAB RELEASE | Supported Python Versions | OS supported by matlab-deps|Supported by this Dockerfile |
# ---------------| (MATLAB Engine for Python) |----------------------------|---------------------------------|
# ---------------|----------------------------|----------------------------|---------------------------------|
# R2024b | 3.9, 3.10, 3.11, 3.12 | Ubuntu 22.04 & 20.04 | Yes |
# R2024a | 3.9, 3.10, 3.11 | Ubuntu 22.04 & 20.04 | Yes |
# R2023b | 3.9, 3.10, 3.11 | Ubuntu 22.04 & 20.04 | Yes |
# R2023a | 3.8, 3.9, 3.10 | Ubuntu 22.04 & 20.04 | Yes |
Expand All @@ -28,11 +29,11 @@
# R2021a | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile.byoi |
# R2020b | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile.byoi |

# Specify release of MATLAB to build. (use lowercase, default is r2024a)
ARG MATLAB_RELEASE=r2024a
# Specify release of MATLAB to build. (Default is R2024b)
ARG MATLAB_RELEASE=R2024b

# Specify version of python thats used by jupyter/base-notebbok
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024a, R2023b, R2023a & R2022b
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024b to R2022b.
ARG PYTHON_VERSION=3.10

# Specify name of Docker Image with MATLAB already installed.
Expand Down Expand Up @@ -110,7 +111,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update \
ca-certificates \
xvfb \
git \
&& wget ${MATLAB_DEPS_REQUIREMENTS_FILE} -O ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} \
&& wget $(echo ${MATLAB_DEPS_REQUIREMENTS_FILE} | tr "[:upper:]" "[:lower:]") -O ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} \
&& xargs -a ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} -r apt-get install --no-install-recommends -y \
&& apt-get clean \
&& apt-get -y autoremove \
Expand Down
11 changes: 6 additions & 5 deletions matlab/Dockerfile.mounted
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# For complete listing, see https://github.com/mathworks-ref-arch/container-images/tree/main/matlab-deps

## Sample Build Command:
# docker build --build-arg MATLAB_RELEASE=r2024a \
# docker build --build-arg MATLAB_RELEASE=R2024b \
# --build-arg PYTHON_VERSION=3.11 \
# --build-arg [email protected] \
# -t my_matlab_image_name .
Expand All @@ -18,6 +18,7 @@
# MATLAB RELEASE | Supported Python Versions | OS supported by matlab-deps|Supported by this Dockerfile |
# ---------------| (MATLAB Engine for Python) |----------------------------|---------------------------------|
# ---------------|----------------------------|----------------------------|---------------------------------|
# R2024b | 3.9, 3.10, 3.11, 3.12 | Ubuntu 22.04 & 20.04 | Yes |
# R2024a | 3.9, 3.10, 3.11 | Ubuntu 22.04 & 20.04 | Yes |
# R2023b | 3.9, 3.10, 3.11 | Ubuntu 22.04 & 20.04 | Yes |
# R2023a | 3.8, 3.9, 3.10 | Ubuntu 22.04 & 20.04 | Yes |
Expand All @@ -27,12 +28,12 @@
# R2021a | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile.mounted |
# R2020b | 3.8 | Ubuntu 20.04 | No, use ubuntu20.04/Dockerfile.mounted |

# Specify release of MATLAB being mounted. (use lowercase, default is r2024a)
# Specify release of MATLAB being mounted. (Default is R2024b)
# Used to fetch & install MATLAB's s/w dependencies
ARG MATLAB_RELEASE=r2024a
ARG MATLAB_RELEASE=R2024b

# Specify version of python thats used by jupyter/base-notebbok
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024a, R2023b, R2023a & R2022b
# Using python 3.10 as default as it is the latest version compatible with MATLAB Engine for Python in R2024b to R2022b.
ARG PYTHON_VERSION=3.10

# Optional Network License Server information in the form of port@hostname
Expand Down Expand Up @@ -79,7 +80,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && apt-get update \
wget \
xvfb \
git \
&& wget ${MATLAB_DEPS_REQUIREMENTS_FILE} -O ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} \
&& wget $(echo ${MATLAB_DEPS_REQUIREMENTS_FILE} | tr "[:upper:]" "[:lower:]") -O ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} \
&& xargs -a ${MATLAB_DEPS_REQUIREMENTS_FILE_NAME} -r apt-get install --no-install-recommends -y \
&& apt-get clean \
&& apt-get -y autoremove \
Expand Down
10 changes: 5 additions & 5 deletions matlab/README-byoi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ Pass the name of your existing MATLAB image to docker build using the `build-tim
`Dockerfile.byoi` supports the following build-time variables:
| Argument Name | Default value | Effect |
|---|---|---|
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | r2024a | The MATLAB release you are using. Used to install its software dependencies.|
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | R2024b | The MATLAB release you are using. Used to install its software dependencies.|
| [PYTHON_VERSION](#choose-version-of-python) | 3.10 | Select version of Python used by Jupyter. See [here](https://hub.docker.com/r/jupyter/base-notebook/tags?page=1&name=python-), for list of Python tags available for use. |
| **MATLAB_IMAGE_NAME** | mathworks/matlab:r2024a | Specify the name of the Docker image that MATLAB should be extracted from. |
| **MATLAB_IMAGE_NAME** | mathworks/matlab:R2024b | Specify the name of the Docker image that MATLAB should be extracted from. |
| [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`. </br> Click [Using the Network License Manager](https://github.com/mathworks-ref-arch/matlab-dockerfile#use-the-network-license-manager) to learn more.|

Listed below is an example of the command to build a Docker image that extracts MATLAB from the image `mathworks/matlab:r2024a` on DockerHub and installs it into `jupyter/base-notebook:python-3.10` with a License Server.
Listed below is an example of the command to build a Docker image that extracts MATLAB from the image `mathworks/matlab:R2024b` on DockerHub and installs it into `jupyter/base-notebook:python-3.10` with a License Server.
```bash
docker build --build-arg MATLAB_RELEASE=r2024a \
docker build --build-arg MATLAB_RELEASE=R2024b \
--build-arg PYTHON_VERSION=3.10 \
--build-arg MATLAB_IMAGE_NAME=mathworks/matlab:r2024a \
--build-arg MATLAB_IMAGE_NAME=mathworks/matlab:R2024b \
--build-arg [email protected] \
-t matlab-notebook -f Dockerfile.byoi .
```
Expand Down
10 changes: 5 additions & 5 deletions matlab/README-mounted.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ Look in the directory `matlab/ubuntu20.04` for Dockerfiles that are based on `ub

Build a Docker image called `matlab-notebook-nomatlab`, using the file `Dockerfile.mounted`.

Listed below is an example of the command to build a Docker image that extracts MATLAB from the image `mathworks/matlab:r2024a` on DockerHub and installs it into `jupyter/base-notebook:python-3.10` with a License Server.
Listed below is an example of the command to build a Docker image that extracts MATLAB from the image `mathworks/matlab:R2024b` on DockerHub and installs it into `jupyter/base-notebook:python-3.10` with a License Server.
```bash
docker build --build-arg MATLAB_RELEASE=r2024a \
docker build --build-arg MATLAB_RELEASE=R2024b \
--build-arg PYTHON_VERSION=3.10 \
--build-arg MATLAB_IMAGE_NAME=mathworks/matlab:r2024a \
--build-arg MATLAB_IMAGE_NAME=mathworks/matlab:R2024b \
--build-arg [email protected] \
-t matlab-notebook-nomatlab -f Dockerfile.mounted .
```

### Start the Docker Container

Execute the command below to start a Docker container, bind mount the directory `/usr/local/MATLAB/R2024a` (which must contain a MATLAB R2024a or later 64 bit Linux installation) into the directory `/opt/matlab` inside the container, and bind port 8888 on the host to port 8888 of the container (by default, Jupyter's app-server runs on port 8888 inside the container):
Execute the command below to start a Docker container, bind mount the directory `/usr/local/MATLAB/R2024b` (which must contain a MATLAB R2024b or later 64 bit Linux installation) into the directory `/opt/matlab` inside the container, and bind port 8888 on the host to port 8888 of the container (by default, Jupyter's app-server runs on port 8888 inside the container):

```bash
docker run -it -v /usr/local/MATLAB/R2024a:/opt/matlab:ro -p 8888:8888 matlab-notebook-nomatlab
docker run -it -v /usr/local/MATLAB/R2024b:/opt/matlab:ro -p 8888:8888 matlab-notebook-nomatlab
```

Access the Jupyter Notebook by following one of the URLs displayed in the output of the ```docker run``` command.
Expand Down
6 changes: 3 additions & 3 deletions matlab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-integration-for-ju

| Argument Name | Default value | Effect |
|---|---|---|
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | r2024a | The MATLAB release you want to install. **MUST** be newer than `r2020b` and specified in lower-case|
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | R2024b | The MATLAB release you want to install. **MUST** be newer than `r2020b` and specified in lower-case|
| [MATLAB_PRODUCT_LIST](#customize-products-to-install) | MATLAB | Specify the list of products to install using product names separated by spaces. Replace spaces within names with underscores. For example: `MATLAB Simulink Deep_Learning_Toolbox Parallel_Computing_Toolbox` </br> See [MPM Documentation](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md) for more information.|
| [PYTHON_VERSION](#choose-version-of-python) | 3.10 | Select version of Python used by Jupyter. See [here](https://hub.docker.com/r/jupyter/base-notebook/tags?page=1&name=python-), for list of Python tags available for use. |
| [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`. </br> Click [Using the Network License Manager](https://github.com/mathworks-ref-arch/matlab-dockerfile#use-the-network-license-manager) to learn more.|
Expand All @@ -60,8 +60,8 @@ docker build --build-arg MATLAB_PRODUCT_LIST="MATLAB Symbolic_Math_Toolbox" -t m

### Build an Image for a Different Release of MATLAB
```bash
# Builds an image with MATLAB R2024a
docker build --build-arg MATLAB_RELEASE=r2024a -t matlab-notebook .
# Builds an image with MATLAB R2024b
docker build --build-arg MATLAB_RELEASE=R2024b -t matlab-notebook .
```

### Build an Image with a different version of Python.
Expand Down
Loading

0 comments on commit d61d518

Please sign in to comment.