MATLAB on the UKB-RAP Questions
The article MATLAB on the UKB-RAP guides researchers on how to access MATLAB through the UK Biobank Research Analysis Platform.
Please use this community forum post to contribute any further knowledge, questions, or difficulties you may be facing when following this guide.
Related to
Comments
2 comments
Hi all, we recently set up a MATLAB docker image (similarly to the guide UKB provided), but are wondering if you can advise on a simple method to get output from the MATLAB analyses (within docker) back into the UKB project space?
For now, we think the easiest method would be to: create a new folder within ttyd; specify that folder as an additional mounted directory (in read-write mode) when launching the docker image; save output from MATLAB to that mounted directory; and then from ttyd using `dx upload` to save the output against the project. Below is an example command for the corresponding docker run, noting that the output would be upload from matlab_out/
`docker run --mount type=bind,src=/home/dnanexus/matlab_out,dst=/home/matlab_out -v "/mnt/project/matlab_resources/":/home/dnax/:rw --gpus all -it -p 8080:6080 --shm-size=40gb mathworks/matlab:r2022b -vnc`
Hi Thomas,
Thanks for sharing your method, this is correct. One potential alternative could be to utilise the Swiss Army Knife in order to run a pre-defined script/function on the input data without user interaction via a VNC.
In this case, the 'out' (or the out/out) directory can be used to pipe outputs to from the docker container and the dx upload aspect is handled automatically.
Considerations - we don't know how to ensure your license is forwarded and accepted by MATLAB in this case, but it may be a tractable problem if you are building your own image.
Let us know of this works for you.
Thank you for using the community forum!
Please sign in to leave a comment.