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.
You will need working installations of:
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:
- The Python script is called
matpower_desktop.py
instead ofoctave_desktop.py
and is found athttps://raw.githubusercontent.com/MATPOWER/matpower/master/docker/matpower_desktop.py
(not athttps://raw.githubusercontent.com/compdatasci/octave-desktop/master/octave_desktop.py
).
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
.
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.