Skip to content

Commit b7b48f1

Browse files
epaganonmichaelmcdonnellmw
authored andcommitted
Update the matlab-batch README to use the new token format
1 parent d46917f commit b7b48f1

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

alternates/non-interactive/MATLAB-BATCH.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,17 @@ Give the downloaded file executable permissions so that you can run `matlab-batc
9494
### Hello, World.
9595
To execute a MATLAB statement, navigate to the folder containing the `matlab-batch` binary file and run the following command.
9696

97-
./matlab-batch -licenseToken "[email protected]|encodedToken" "disp('Hello, World.')"
97+
./matlab-batch -licenseToken "[email protected]::encodedToken" "disp('Hello, World.')"
9898

9999
You can also provide your MATLAB batch licensing token with the `MLM_LICENSE_TOKEN` environment variable.
100100

101-
export MLM_LICENSE_TOKEN="[email protected]|encodedToken"
101+
export MLM_LICENSE_TOKEN="[email protected]::encodedToken"
102102
./matlab-batch "disp('Hello, World.')"
103103

104104
### Run MATLAB with Startup Options
105105
To run MATLAB with any set of arguments, such as `-logfile`, execute:
106106

107-
./matlab-batch -licenseToken "[email protected]|encodedToken" -logfile "logfilename.log" "myscript"
107+
./matlab-batch -licenseToken "[email protected]::encodedToken" -logfile "logfilename.log" "myscript"
108108

109109
To learn more, see the documentation: [Commonly Used Startup Options](https://www.mathworks.com/help/matlab/matlab_env/commonly-used-startup-options.html).
110110

@@ -119,15 +119,15 @@ To learn more, see the documentation: [Commonly Used Startup Options](https://ww
119119
## Batch Options
120120
| Option | Description | Example |
121121
| --------------- | ----------- | ------- |
122-
| `-licenseToken` | MATLAB batch licensing token. Related environment variable: `MLM_LICENSE_TOKEN`. | `[email protected]\|label\|encodedToken`, `[email protected]\|encodedToken` |
122+
| `-licenseToken` | MATLAB batch licensing token. Related environment variable: `MLM_LICENSE_TOKEN`. | `[email protected]::label::encodedToken`, `[email protected]::encodedToken` |
123123

124124
## MATLAB Batch Licensing Token
125125

126126
MATLAB batch licensing tokens are strings that enable MATLAB to start in non-interactive environments. A token is a unique identifier that grants access to your MATLAB products.
127127

128128
MATLAB batch licensing tokens come in two formats:
129-
- `[email protected]|encodedToken`
130-
- `[email protected]|label|encodedToken`
129+
- `[email protected]::encodedToken`
130+
- `[email protected]::label::encodedToken`
131131

132132
These tokens can be used instead of, or in addition to, other types of licensing.
133133

alternates/non-interactive/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ docker build -t matlab-non-interactive:R2024b .
3131
You can then run the container and use the `matlab-batch` command. Test the container by running an example MATLAB command, such as `rand`. 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.
3232

3333
```bash
34-
docker run --init --rm matlab-non-interactive:R2024b matlab-batch -licenseToken "[email protected]|encodedToken" "rand"
34+
docker run --init --rm matlab-non-interactive:R2024b matlab-batch -licenseToken "[email protected]::encodedToken" "rand"
3535
```
3636
For more information, see [Run the Container](#run-the-container).
3737

@@ -86,13 +86,13 @@ With the `docker run` command, use one of these options.
8686
- Specify the `-licenseToken` run-arg.
8787
```bash
8888
# Example
89-
docker run --init --rm matlab-non-interactive:R2024b matlab-batch -licenseToken "[email protected]|encodedToken" "disp('Hello, World.')"
89+
docker run --init --rm matlab-non-interactive:R2024b matlab-batch -licenseToken "[email protected]::encodedToken" "disp('Hello, World.')"
9090
```
9191

9292
- Specify the `MLM_LICENSE_TOKEN` environment variable.
9393
```bash
9494
# Example
95-
export MLM_LICENSE_TOKEN="[email protected]|encodedToken"
95+
export MLM_LICENSE_TOKEN="[email protected]::encodedToken"
9696
docker run --init --rm -e MLM_LICENSE_TOKEN matlab-non-interactive:R2024b matlab-batch "disp('Hello, World.')"
9797
```
9898

@@ -101,7 +101,7 @@ This Dockerfile's default entry-point is a shell session. After you start the co
101101
102102
```bash
103103
# Launch MATLAB, print Hello, World., and exit:
104-
docker run --init --rm matlab-non-interactive:R2024b matlab-batch -licenseToken "[email protected]|encodedToken" "disp('Hello, World.')"
104+
docker run --init --rm matlab-non-interactive:R2024b matlab-batch -licenseToken "[email protected]::encodedToken" "disp('Hello, World.')"
105105
```
106106
107107
You can set your MATLAB batch licensing token at the container level by setting the `MLM_LICENSE_TOKEN` environment variable, as shown in the examples below.
@@ -110,15 +110,15 @@ You can set your MATLAB batch licensing token at the container level by setting
110110
To start the container, run a MATLAB command and exit, use this command.
111111
```bash
112112
# Container runs the command RAND in MATLAB and exits.
113-
export MLM_LICENSE_TOKEN="[email protected]|encodedToken"
113+
export MLM_LICENSE_TOKEN="[email protected]::encodedToken"
114114
docker run --init --rm -e MLM_LICENSE_TOKEN matlab-non-interactive:R2024b matlab-batch rand
115115
```
116116
117117
### Run a MATLAB script
118118
To start the container, run a MATLAB script and exit, use this command.
119119
```bash
120120
# Container runs the script myscript.m in MATLAB and exits.
121-
export MLM_LICENSE_TOKEN="[email protected]|encodedToken"
121+
export MLM_LICENSE_TOKEN="[email protected]::encodedToken"
122122
docker run --init --rm -v $(pwd):/content -w /content -e MLM_LICENSE_TOKEN matlab-non-interactive:R2024b matlab-batch "myscript"
123123
```
124124
@@ -137,4 +137,4 @@ To learn more, see the documentation: [Help Make MATLAB Even Better - Frequently
137137
We encourage you to try this repository with your environment and provide feedback. If you encounter a technical issue or have an enhancement request, create an issue [here](https://github.com/mathworks-ref-arch/matlab-dockerfile/issues).
138138
139139
---
140-
Copyright 2024 The MathWorks, Inc.
140+
Copyright 2024-2025 The MathWorks, Inc.

tests/.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# Copyright 2023 The MathWorks, Inc.
2-
__pycache__
1+
# Copyright 2023-2025 The MathWorks, Inc.
2+
__pycache__
3+
.venv

0 commit comments

Comments
 (0)