Setting up multiple EEG workstations in a lab can be quite an expensive and complex task. Traditionally, this would involve having a separate workstation for each user, which can be both costly and inefficient. Fortunately, MATHWORKS has introduced Matlab in Docker containers, enabling a complete graphical experience of Matlab while running multiple instances on a single computer.
Running Multiple Matlab Instances on a Single Computer
With this technology, you can now run between 4-5 Matlab instances on a typical multicore workstation that can be accessed by users through their web browser. This means that everyone can work on the same pool of files and easily collaborate by "hopping" on each other's instances, which are addressed by port numbers. This is a huge help for a post-doc who is monitoring different preprocessors.
Configuring GPU Passthrough and Memory/CPU Sharing
In addition, you can configure GPU passthrough and set up limits on memory and CPU sharing by using docker configuration. Matlab licensing is also fairly flexible, and you can pass any type of license through the container to be validated by Matlab license servers, including academic network, student, or professional.
Using a docker compose file, you can easily set up multiple instances at once, clone them, and then activate them. If modifications need to be made to the container, such as installing R or a web browser, these changes can be committed to the image and reused to set up cloned containers.
Overall, this has been game-changer for our lab, allowing for more efficient use of resources and easier collaboration among users. So if you're looking to streamline your EEG analysis workflow.
In future posts we will expand this to discuss the use of Docker containers on a HPC and some of the tricker aspects of file and user management.
Visit our Github repository for sample docker-compose file:
dockerized-matlab @ cincibrainlab
Here are the steps to set up MATLAB Docker containers and access them from a web browser using the MathWorks official Docker pages: