Skip to content

Commit b6d3a43

Browse files
Anirudh Kulkarniprabhakk-mw
Anirudh Kulkarni
authored andcommitted
Corrected typos and improved grammar in README files.
1 parent a12591c commit b6d3a43

File tree

4 files changed

+142
-148
lines changed

4 files changed

+142
-148
lines changed

README.md

+49-53
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# Create a MATLAB Container Image
1+
# Create MATLAB Container Image
22

3-
This repository shows you how to build and customize a Docker® container for MATLAB® and its toolboxes, using the [MATLAB Package Manager (*mpm*)](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md).
3+
This repository shows you how to build and customize a Docker® container for MATLAB® and its toolboxes, using the [MATLAB Package Manager](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md) (`mpm`). You can use this container image as a scalable and reproducible method to deploy and test your MATLAB code.
44

5-
You can use this container image as a scalable and reproducible method to deploy and test your MATLAB code.
6-
7-
Use the [Dockerfile](Dockerfile) in this top-level repository if you want a lightweight and simple way to create a MATLAB container image. You can also download prebuilt images based on this Dockerfile from [here](https://github.com/mathworks-ref-arch/matlab-dockerfile/pkgs/container/matlab-dockerfile%2Fmatlab).
5+
Use the [Dockerfile](Dockerfile) in this top-level repository if you want a lightweight and simple way to create a MATLAB container image. You can also download prebuilt images based on the Dockerfile from [here](https://github.com/mathworks-ref-arch/matlab-dockerfile/pkgs/container/matlab-dockerfile%2Fmatlab).
86

97
For alternative resources, see the [**alternates folder**](alternates) that contains the following Dockerfiles:
108

@@ -16,77 +14,76 @@ For alternative resources, see the [**alternates folder**](alternates) that cont
1614
For more Docker related resources, see [More MATLAB Docker Resources](#more-matlab-docker-resources).
1715

1816
### Requirements
19-
* [A Running Network License Manager for MATLAB](https://www.mathworks.com/help/install/administer-network-licenses.html)
20-
* For more information, see [Using the Network License Manager](#use-the-network-license-manager)
21-
* Docker
17+
* [A running network license manager for MATLAB](https://www.mathworks.com/help/install/administer-network-licenses.html) — For more information, see [Using the Network License Manager](#use-the-network-license-manager).
18+
* Docker.
2219

2320
## Build Instructions
2421

2522
### Get Sources
2623

27-
Access this Dockerfile either by directly downloading this repository from GitHub®,
24+
Access the Dockerfile either by directly downloading this repository from GitHub®,
2825
or by cloning this repository and
2926
then navigating to the appropriate folder.
3027
```bash
3128
git clone https://github.com/mathworks-ref-arch/matlab-dockerfile.git
3229
cd matlab-dockerfile
3330
```
3431

35-
### Build & Run Docker Image
32+
### Build and Run Docker Image
3633

3734
Build container with a name and tag of your choice.
3835
```bash
3936
docker build -t matlab:R2024b .
4037
```
4138

42-
Run the container. Test the container by running an example MATLAB command such as ver.
39+
Run the container. Test the container by running an example MATLAB command, such as `ver`.
4340
```bash
4441
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:R2024b -batch ver
4542
```
4643
The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) defaults to building a container for MATLAB R2024b.
4744

48-
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).
45+
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 [Run the Container](#run-the-container) section.
4946

5047
> **Note**
5148
>
52-
> Using the `--init` flag in the `docker run` command ensures that the container stops gracefully when a `docker stop` or `docker kill` command is issued.
53-
> For more information, see the following links:
54-
> * [Docker run reference page](https://docs.docker.com/reference/cli/docker/container/run/#init).
55-
> * [Blog post on the usage of init](https://www.baeldung.com/ops/docker-init-parameter).
49+
> Use the `--init` flag in the `docker run` command to ensure that the container stops gracefully when a `docker stop` or `docker kill` command is issued.
50+
> For more information, see these links:
51+
> * [Reference page for `docker run`](https://docs.docker.com/reference/cli/docker/container/run/#init)
52+
> * [Blog post on the usage of init](https://www.baeldung.com/ops/docker-init-parameter)
5653
5754

5855
## Customize the Image
5956

60-
By default, the [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) installs MATLAB for the latest available MATLAB release without any additional toolboxes or products in the `/opt/matlab/${MATLAB_RELEASE}` folder.
57+
By default, the [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) installs the latest available MATLAB release without any additional toolboxes or products in the `/opt/matlab/${MATLAB_RELEASE}` folder.
6158

6259
Use the options below to customize your build.
6360

64-
### Customize MATLAB Release, MATLAB Product List, MATLAB Install Location and License Server
65-
The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) supports the following Docker build-time variables:
61+
### Customize MATLAB Release, MATLAB Product List, MATLAB Install Location, and License Server
62+
The [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile) supports these Docker build-time variables:
6663

6764
| Argument Name | Default value | Description |
6865
|---|---|---|
69-
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | R2024b | The MATLAB release to install, for example, `R2023b`.|
70-
| [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`|
71-
| [MATLAB_INSTALL_LOCATION](#build-an-image-with-matlab-installed-to-a-specific-location) | /opt/matlab/R2024b | The path to install MATLAB. |
72-
| [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` |
66+
| [MATLAB_RELEASE](#build-an-image-for-a-different-release-of-matlab) | R2024b | MATLAB release to install, for example, `R2023b`.|
67+
| [MATLAB_PRODUCT_LIST](#build-an-image-with-a-specific-set-of-products) | MATLAB | Space-separated list of products to install, for example, `MATLAB Simulink Deep_Learning_Toolbox Fixed-Point_Designer`. For more information, see [MPM.md](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md).|
68+
| [MATLAB_INSTALL_LOCATION](#build-an-image-with-matlab-installed-to-a-specific-location) | /opt/matlab/R2024b | Path to install MATLAB. |
69+
| [LICENSE_SERVER](#build-an-image-configured-to-use-a-license-server) | *unset* | Port and hostname of the machine that is running the network license manager, using the `port@hostname` syntax. For example: `27000@MyServerName` |
7370

7471
Use these arguments with the the `docker build` command to customize your image.
7572
Alternatively, you can change the default values for these arguments directly in the [Dockerfile](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/Dockerfile).
7673

77-
#### Build an Image for a Different Release of MATLAB
74+
#### Build an Image for a Different MATLAB Release
7875
For example, to build an image for MATLAB R2019b, use this command.
7976
```bash
8077
docker build --build-arg MATLAB_RELEASE=R2019b -t matlab:R2019b .
8178
```
8279

83-
#### Build an Image with a specific set of products
80+
#### Build an Image with a Specific Set of Products
8481
For example, to build an image with MATLAB and Simulink®, use this command.
8582
```bash
8683
docker build --build-arg MATLAB_PRODUCT_LIST='MATLAB Simulink' -t matlab:R2024b .
8784
```
8885

89-
#### Build an Image with MATLAB installed to a specific location
86+
#### Build an Image with MATLAB Installed to a Specific Location
9087
For example, to build an image with MATLAB installed at /opt/matlab, use this command.
9188
```bash
9289
docker build --build-arg MATLAB_INSTALL_LOCATION='/opt/matlab' -t matlab:R2024b .
@@ -96,32 +93,31 @@ docker build --build-arg MATLAB_INSTALL_LOCATION='/opt/matlab' -t matlab:R2024b
9693

9794
Including the license server information with the `docker build` command means you do not have to pass it when running the container.
9895
```bash
99-
# Build container with the License Server.
96+
# Build container with the license server.
10097
docker build --build-arg LICENSE_SERVER=27000@MyServerName -t matlab:R2024b .
10198

102-
# Run the container, without needing to pass license information.
99+
# Run the container without needing to pass license information.
103100
docker run --init --rm matlab:R2024b -batch ver
104101
```
105102

106103
## Use the Network License Manager
107-
This container requires a Network License Manager to license and run MATLAB. You will need either the port and hostname of the Network License Manager, or a `network.lic` file.
104+
This container requires a network license manager to license and run MATLAB. You need either the port and hostname of the network license manager or a `network.lic` file.
108105

109106
**Step 1**: Contact your system administrator, who can provide one of the following:
110107

111-
1. The address to your server, and the port it is running on.
112-
For example: `[email protected]`
108+
* The address to your server, and the port it is running on, for example, `[email protected]`
113109

114-
2. A `network.lic` file which contains the following lines:
110+
* A `network.lic` file containing these lines.
115111
```bash
116112
# Sample network.lic
117113
SERVER MyServerName.example.com <optional-mac-address> 27000
118114
USE_SERVER
119115
```
120116

121-
3. A `license.dat` file. Open the `license.dat` file, find the `SERVER` line, and either extract the `port@hostname`, or create a `network.lic` file by copying the `SERVER` line and adding a `USE_SERVER` line below it.
117+
* A `license.dat` file. Open the `license.dat` file, find the `SERVER` line, and either extract the `port@hostname`, or create a `network.lic` file by copying the `SERVER` line and adding a `USE_SERVER` line below it.
122118

123119
```bash
124-
# snippet from sample license.dat
120+
# Snippet from sample license.dat
125121
SERVER MyServerName.example.com <mac-address> 27000
126122
```
127123
---
@@ -135,17 +131,17 @@ With the `docker build` command, either:
135131
# Example
136132
docker build -t matlab:R2024b --build-arg LICENSE_SERVER=27000@MyServerName .
137133
```
138-
- Use the `network.lic` file:
134+
- Use the `network.lic` file.
139135
1. Place the `network.lic` file in the same folder as the Dockerfile.
140136
1. Uncomment the line `COPY network.lic /opt/matlab/licenses/` in the Dockerfile.
141-
1. Run the docker build command **without** the `LICENSE_SERVER` build-arg:
137+
1. Run the `docker build` command **without** the `LICENSE_SERVER` build-arg:
142138

143139
```bash
144140
# Example
145141
docker build -t matlab:R2024b .
146142
```
147143

148-
With the `docker run` command, use the `MLM_LICENSE_FILE` environment variable. For example:
144+
With the `docker run` command, use the `MLM_LICENSE_FILE` environment variable.
149145

150146
```bash
151147
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:R2024b -batch ver
@@ -155,51 +151,51 @@ docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:R2024b -bat
155151
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`.
156152
157153
```bash
158-
# Start MATLAB, print version information, and exit:
154+
# Start MATLAB, print version information, and exit.
159155
docker run --init --rm -e MLM_LICENSE_FILE=27000@MyServerName matlab:R2024b -batch ver
160156
```
161157
162158
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.
163159
164160
### Run MATLAB in an Interactive Command Prompt
165-
To start the container and run MATLAB in an interactive command prompt, execute:
161+
To start the container and run MATLAB in an interactive command prompt, use this command.
166162
```bash
167163
docker run --init -it --rm matlab:R2024b
168164
```
169165
### Run MATLAB in Batch Mode
170-
To start the container, run a MATLAB command, and then exit, execute:
166+
To start the container, run a MATLAB command, and then exit, use this command.
171167
```bash
172168
# Container runs the command RAND in MATLAB and exits.
173169
docker run --init --rm matlab:R2024b -batch rand
174170
```
175171
176172
### Run MATLAB with Startup Options
177-
To override the default behavior of the container and run MATLAB with any set of arguments, such as `-logfile`, execute:
173+
To override the default behavior of the container and run MATLAB with any set of arguments, such as `-logfile`, use this command.
178174
```bash
179175
docker run --init -it --rm matlab:R2024b -logfile "logfilename.log"
180176
```
181177
To learn more, see the documentation: [Commonly Used Startup Options](https://www.mathworks.com/help/matlab/matlab_env/commonly-used-startup-options.html).
182178
183179
184180
## More MATLAB Docker Resources
185-
* Explore prebuilt MATLAB Docker Containers on Docker Hub: https://hub.docker.com/r/mathworks
181+
* Explore prebuilt MATLAB Docker Containers on Docker Hub: https://hub.docker.com/r/mathworks.
186182
* [MATLAB Containers on Docker Hub](https://hub.docker.com/r/mathworks/matlab) hosts container images for multiple releases of MATLAB.
187183
* [MATLAB Deep Learning Containers on Docker Hub](https://hub.docker.com/r/mathworks/matlab-deep-learning) hosts container images with toolboxes suitable for Deep Learning.
188-
* Enable additional capabilities using the [MATLAB Dependencies repository](https://github.com/mathworks-ref-arch/container-images/tree/master/matlab-deps).
189-
For some workflows and toolboxes, you must specify dependencies. You must do this if you want to do any of the following tasks:
190-
* Install extended localization support for MATLAB.
191-
* Play media files from MATLAB.
192-
* Generate code from Simulink.
193-
* Use mex functions with gcc, g++, or gfortran.
194-
* Use the MATLAB Engine API for C and Fortran&reg;.
195-
* Use the Polyspace&reg; 32-bit tcc compiler.
184+
* Enable additional capabilities using the [MATLAB Dependencies repository](https://github.com/mathworks-ref-arch/container-images/tree/main/matlab-deps).
185+
For some workflows and toolboxes, you must specify dependencies. You must do this if you want to do these tasks:
186+
* Install extended localization support for MATLAB
187+
* Play media files from MATLAB
188+
* Generate code from Simulink
189+
* Use mex functions with gcc, g++, or gfortran
190+
* Use the MATLAB Engine API for C and Fortran&reg;
191+
* Use the Polyspace&reg; 32-bit tcc compiler
196192
197-
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).
193+
The [MATLAB Dependencies repository](https://github.com/mathworks-ref-arch/container-images/tree/main/matlab-deps) 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).
198194
199-
These Dockerfiles contain commented lines with the libraries that support these additional capabilities. Copy and uncomment these lines into your Dockerfile.
195+
These Dockerfiles contain commented lines with the libraries that support additional capabilities. Copy and uncomment these lines into your Dockerfile.
200196
201197
## Help Make MATLAB Even Better
202-
You can help improve MATLAB by providing user experience information on how you use MathWorks products. Your participation ensures that you are represented and helps us design better products. To opt out of this service, delete the following line in the Dockerfile:
198+
You can help improve MATLAB by providing user experience information on how you use MathWorks products. Your participation ensures that you are represented and helps us design better products. To opt out of this service, delete this line in the Dockerfile.
203199
```Dockerfile
204200
ENV MW_DDUX_FORCE_ENABLE=true MW_CONTEXT_TAGS=MATLAB:DOCKERFILE:V1
205201
```

0 commit comments

Comments
 (0)