Skip to content

Update MATLAB Image README file#290

Open
aranega wants to merge 3 commits into
dandi:mainfrom
MetaCell:main
Open

Update MATLAB Image README file#290
aranega wants to merge 3 commits into
dandi:mainfrom
MetaCell:main

Conversation

@aranega

@aranega aranega commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

This PR relates to #278 which updates information from the README file for the MATLAB Dockerfile.

@vijayiyer05 I had to create a new PR as I couldn't directly modified your PR or push on your repository

@vijayiyer05

Copy link
Copy Markdown

This moves the manifest table & related info to the place I would intuitively look. Thanks @aranega!

Have captured his notes from the predecessor PR (#278) to remind myself to look again in near future for possible refinements (non-blocking for this PR).

I refreshed some sections at the same time, adding some new information about the Latest Commit entries, double-check/updated the versions of each lib if necessary, and refreshed the end of the README that was a little bit outdated.

Comment thread images/matlab/README.md
Running a container for the built image requires that a port is passed to the command line to tell the container which internal port needs to be exposed and on which port to map it in the host system.

```bash
docker run -p 8888:8888 dandi-matlab:latest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is cool I didnt realize this would work outside of nebari!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, I saw the notification yesterday, and I got hooked and forgot to answer. Indeed, we can run it outside of Nebari, but there is a twist. The documentation is not well in-lined here, thanks for having spot that! If we want to run it locally without Nebari, we need to comment the ENTRYPOINT in the Dockerfile, otherwise, all should be fine, this is how I do to make quick tests. The other constraint is that with this command, no volume is mounted, so each run "flushes" the $HOME directory. I'll update the README to reflect that and what to change in the image to make the tests locally.

Comment thread images/matlab/README.md
### Closing your Session

Be careful while closing your session.
If you don't close the session properly prior to stop your container, _i.e_: closing the MATLAB session and disconnecting yourself, there is chances that the MATLAB licencing system sees yourself as still connected and you'll have to wait the timeout of the session to be able to log/connect again after restarting the container.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to recover from this? I assume if you stop the container and restart that there is no persistent state to let you disconnect.

If not I think this should be moved a warning before "how to run"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, we cannot do nothing, the licensing system is hosted by MATLAB, we don't have control over this. Loging out is actually sending the clean dispose request to the licensing server. I saw that lately it was less strict than before, or the time to wait was shorter, not 2h or 3h as before.

Comment thread images/matlab/README.md
Comment on lines +107 to +132
```dockerfile
# Generate MATLAB startup script
RUN echo -e "\n\
% Set the number of workers for 'Processes' to 5\n\
cluster = parcluster('Processes'); \n\
cluster.NumWorkers = 5; \n\
saveProfile(cluster); \n\
\n\
% Copy the live-example folder \n\
homedirExamples = strcat(getenv('HOME'), '/example-live-scripts') \n\
if not(isfolder(homedirExamples)) \n\
repo = gitclone('https://github.com/MATLAB-Community-Toolboxes-at-INCF/example-live-scripts', homedirExamples, Depth=1); \n\
end \n\
% Add the example library to the path \n\
addpath(homedirExamples); \n\
% Add the addons to the path \n\
addons = dir('${ADDONS_DIR}'); \n\
addons = setdiff({addons([addons.isdir]).name}, {'.', '..'}); \n\
for addon_idx = 1:numel(addons) \n\
addpath(genpath(strcat('${ADDONS_DIR}/', addons{addon_idx}))); \n\
end \n\
% generateCore(); % Generate the most recent nwb-schema \n\
% ciapkg.io.loadDependencies('guiEnabled', 0); % Load dependencies for CIAtah \n\
% ADD HERE EXTRA ACTIONS FOR YOUR ADD-ON IF REQUIRED! \n\ <-- Starting here
clear" >> ${STARTUP_SCRIPT}
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we cut this. Lets keep the explanation, but we dont want to maintain this code both in the dockerfile and here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a good call. I'll make a loose reference to the Dockerfile then

Comment thread images/matlab/README.md
file:///home/jovyan/.local/share/jupyter/runtime/jpserver-6-open.html
Or copy and paste one of these URLs:
http://78bd0f342a19:8888/lab?token=6bf3ad4d468ab3532fab610f5ff28dcf27b1b60300ec8e0c
or http://127.0.0.1:8888/lab?token=6bf3ad4d468ab3532fab610f5ff28dcf27b1b60300ec8e0c

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to confim this is an ephemeral/fake token right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, those are generated each time that the docker run command is launched, no problem of leaking secrets or anything :)

@asmacdo asmacdo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review from claude-code+asmacdo — 6 items noted below comparing the README against the actual Dockerfile on main.

@asmacdo asmacdo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review from claude-code+asmacdo — 6 items noted below comparing the README against the actual Dockerfile on main.

Comment thread images/matlab/README.md

This folder contains the Dockerfile to build the MATLAB image for Dandi:

* `Dockerfile.matlab` provides a Nebari compatible jupyter environment with MATLAB(R) installed. This image requires you to bring your own licence.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual file on main is named Dockerfile, not Dockerfile.matlab. This reference (and others in the doc) should be updated.

— claude-code+asmacdo

Comment thread images/matlab/README.md
The following lines consider that you already cloned the repository and that you are positioned in the `docker` folder in the cloned repository on your file system.

```bash
docker build -t dandi-matlab - < Dockerfile.matlab

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This build command has two issues:

  1. The filename should be Dockerfile (see above)
  2. The stdin redirect (- <) does not send build context, but the Dockerfile uses COPY matlab-requirements.txt — so this will fail. Should be:
docker build -t dandi-matlab .

— claude-code+asmacdo

Comment thread images/matlab/README.md
| 9 | Parallel Computing Toolbox | MPM | R2025b | Penultimate MathWorks Release |
| 10 | Signal Processing Toolbox | MPM | R2025b | Penultimate MathWorks Release |
| 11 | Statistics & Machine Learning Toolbox | MPM | R2025b | Penultimate MathWorks Release |
| 12 | Wavelet Toolbox | MPM | R2025b | Penultimate MathWorks Release |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optimization_Toolbox is installed in the Dockerfile but is missing from this table.

— claude-code+asmacdo

Comment thread images/matlab/README.md
This variable defines where the add-ons must be downloaded/extracted and what will be the folder scanned by MATLAB at startup time.
If you change this folder, the Jupyter user needs to have read/write access to it. This comes from a specificity of `matnwb` which requires the execution of some extra actions for its activation.

`ADDONS_RELEASE`:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Customize your Container" section references ADDONS_RELEASE (singular), but the Dockerfile defines ADDONS_RELEASES (plural). This section also references a generic ARG ADDONS that doesn't exist — the Dockerfile has two separate variables: ADDONS_RELEASES and ADDONS_LATEST.

— claude-code+asmacdo

Comment thread images/matlab/README.md
| --- | :--- | :---- | :--- | :--- |
| 1 | MATLAB | MPM | R2025b | Penultimate MathWorks Release |
| 2 | Bioinformatics Toolbox | MPM | R2025b | Penultimate MathWorks Release |
| 3 | Computer Vision Toolbpx | MPM | R2025b | Penultimate MathWorks Release |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: ToolbpxToolbox

— claude-code+asmacdo

Comment thread images/matlab/README.md
| 10 | Signal Processing Toolbox | MPM | R2025b | Penultimate MathWorks Release |
| 11 | Statistics & Machine Learning Toolbox | MPM | R2025b | Penultimate MathWorks Release |
| 12 | Wavelet Toolbox | MPM | R2025b | Penultimate MathWorks Release |
| 13 | Deep Learning Toolbox Converter for TensorFlow Models | MPM | R2025b | Penultimate MathWorks Release

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This row is missing its closing | pipe character, which may break table rendering in some Markdown parsers.

— claude-code+asmacdo

@aranega

aranega commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

@asmacdo Thanks for the review and the modification suggestions! 🙏 I'll try to tackle that asap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants