Git Product home page Git Product logo

matlab-support's Introduction

matlab-support

Docker image with enough dependencies to support a mounted-in Matlab.

This docker image gives you an Ubuntu environment capable of supporting Matlab. For licensing reasons, you must already have your own Matlab installed on the Docker host.

To run Matlab inside the container, you have to provide three things at launch time:

  • Mount in a Matlab installation at /usr/local/MATLAB/from-host.
  • Mount in a folder to receive the Matlab execution log at /var/log/matlab.
  • Spoof the container MAC address to match you own Matlab license file.

Example usages

These expect you to define some local information:

  • MATLAB_ROOT is your matlab installation on the Docker host, perhaps /usr/local/MATLAB/R2016a.
  • MATLAB_LOGS is optional path on the Docker host to receive Matlab logs, perhaps ~/matlab-logs.
  • MATLAB_MAC_ADDRESS is the MAC address associated with your own Matlab License, of the form 00:00:00:00:00:00.

Print Matlab command help:

docker run --rm -v "$MATLAB_ROOT":/usr/local/MATLAB/from-host -v "$MATLAB_LOGS":/var/log/matlab --mac-address="$MATLAB_MAC_ADDRESS" ninjaben/matlab-support

Launch Matlab and print version info:

docker run --rm -v "$MATLAB_ROOT":/usr/local/MATLAB/from-host -v "$MATLAB_LOGS":/var/log/matlab --mac-address="$MATLAB_MAC_ADDRESS" ninjaben/matlab-support -r "version,exit;"

Plot a figure and save it as a png in the logs folder:

docker run --rm -v "$MATLAB_ROOT":/usr/local/MATLAB/from-host -v "$MATLAB_LOGS":/var/log/matlab --mac-address="$MATLAB_MAC_ADDRESS" ninjaben/matlab-support -r "plot(1:10);print('/var/log/matlab/figure.png', '-dpng');exit;"

Thanks

Thanks to Michael Perry at Stanford for info, inspiration, starter code!

matlab-support's People

Contributors

benjamin-heasly avatar

Stargazers

William_Guo avatar

Watchers

Xiaojun Chang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.