Skip to content

Latest commit

 

History

History
103 lines (82 loc) · 3.39 KB

MATPOWER-Docker.md

File metadata and controls

103 lines (82 loc) · 3.39 KB

MATPOWER Docker Image

A complete MATPOWER desktop environment is available in a Docker container by using the matpower/matpower-desktop image on Docker Hub. This image essentially just adds MATPOWER and the MATPOWER Extras to the compdatasci/octave-desktop image, which provides an Ubuntu desktop environment with X Windows and GNU Octave, displaying in your web-browser.

It can also be used in command-line mode without the graphical user interface (GUI), if that is preferred.

System Requirements

You will need working installations of:

  • Docker, and
  • Python (optional, required for use of the GUI)

Using the MATPOWER Docker Image

To set up and use the MATPOWER Docker image, please follow the instructions found in the README for the compdatasci/octave-desktop Docker image, with the following minor difference:

Quick Start

Run via Python script — Access GUI through Web Browser

With Python installed, Docker installed and running, and the matpower_desktop.py script in your working directory ...

python matpower_desktop.py -p

Then via the Terminal window of the Ubuntu desktop that appears in your web-browser window ...

octave &

This runs Octave in your newly launched Docker container, with MATPOWER and the MATPOWER Extras already installed in the Octave path.

You can also access Octave and MATPOWER in this container (the one you launched via Python script) from the command-line on your host machine, either via SSH ...

ssh -X -p 2222 ubuntu@localhost

... then, in the container ...

octave-cli

... or directly via docker exec ...

docker exec -it <container-name> octave-cli

... where <container-name> can be found via docker container ls --all.

Run Directly — Command-line Only

If you do not have a need for the GUI, you can launch a shell or command-line Octave session directly in a new container (without the Python script) via docker run. The following command runs a new container from the MATPOWER Docker image, leaving you at the Octave command-line.

docker run --rm -it matpower/matpower-desktop:latest /sbin/my_init -- octave-cli

Or, if you prefer to enter a session where you can use shell commands (including octave-cli), use:

docker run --rm -it matpower/matpower-desktop:latest /sbin/my_init -- bash -l

In either case, MATPOWER and the MATPOWER Extras are already installed in the Octave path.