Update MATLAB Image README file#290
Conversation
|
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).
|
| 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 |
There was a problem hiding this comment.
this is cool I didnt realize this would work outside of nebari!
There was a problem hiding this comment.
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.
| ### 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. |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
| ```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} | ||
| ``` |
There was a problem hiding this comment.
I think we cut this. Lets keep the explanation, but we dont want to maintain this code both in the dockerfile and here.
There was a problem hiding this comment.
Yes, that's a good call. I'll make a loose reference to the Dockerfile then
| 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 |
There was a problem hiding this comment.
just to confim this is an ephemeral/fake token right?
There was a problem hiding this comment.
Yes, those are generated each time that the docker run command is launched, no problem of leaking secrets or anything :)
asmacdo
left a comment
There was a problem hiding this comment.
Review from claude-code+asmacdo — 6 items noted below comparing the README against the actual Dockerfile on main.
asmacdo
left a comment
There was a problem hiding this comment.
Review from claude-code+asmacdo — 6 items noted below comparing the README against the actual Dockerfile on main.
|
|
||
| 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. |
There was a problem hiding this comment.
The actual file on main is named Dockerfile, not Dockerfile.matlab. This reference (and others in the doc) should be updated.
— claude-code+asmacdo
| 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 |
There was a problem hiding this comment.
This build command has two issues:
- The filename should be
Dockerfile(see above) - The stdin redirect (
- <) does not send build context, but the Dockerfile usesCOPY matlab-requirements.txt— so this will fail. Should be:
docker build -t dandi-matlab .— claude-code+asmacdo
| | 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 | |
There was a problem hiding this comment.
Optimization_Toolbox is installed in the Dockerfile but is missing from this table.
— claude-code+asmacdo
| 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`: |
There was a problem hiding this comment.
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
| | --- | :--- | :---- | :--- | :--- | | ||
| | 1 | MATLAB | MPM | R2025b | Penultimate MathWorks Release | | ||
| | 2 | Bioinformatics Toolbox | MPM | R2025b | Penultimate MathWorks Release | | ||
| | 3 | Computer Vision Toolbpx | MPM | R2025b | Penultimate MathWorks Release | |
There was a problem hiding this comment.
Typo: Toolbpx → Toolbox
— claude-code+asmacdo
| | 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 |
There was a problem hiding this comment.
This row is missing its closing | pipe character, which may break table rendering in some Markdown parsers.
— claude-code+asmacdo
|
@asmacdo Thanks for the review and the modification suggestions! 🙏 I'll try to tackle that asap! |
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