Skip to content

Latest commit

 

History

History
127 lines (100 loc) · 4.38 KB

MATPOWER-Docker.md

File metadata and controls

127 lines (100 loc) · 4.38 KB

MATPOWER Docker Image

A complete MATPOWER environment is available in a Docker container by using the matpower/matpower image on Docker Hub. This image essentially just adds MATPOWER and the MATPOWER Extras to the matpower/octave image, which is simply the corresponding official GNU Octave image (gnuoctave/octave) with several optimization packages pre-installed.

This image supports both a simple command-line mode and, with an X11 server running on the host, the full Octave GUI.

System Requirements

You will need working installations of:

  • Docker, and
  • an X11 server (optional, required for use of the GUI)

Getting Started

1. Get the MATPOWER Docker image

docker pull docker.io/matpower/matpower:latest

2. Start Octave in the container

command line only

docker run -it --rm matpower/matpower:latest octave-cli

graphical user interface
(requires X11 server to be running and DISPLAY environment variable to be set properly)

docker run -it --rm --network=host --env="DISPLAY" \
  --volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
  matpower/matpower:latest octave --force-gui

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

3. Exectute MATPOWER commands

For example ...

mpver
test_matpower
runpf('case9');
mpopt = mpoption('verbose', 2);
runopf('case2383wp', mpopt);

Additional Notes

  • To run a different version of MATPOWER or Octave, replace the latest tag with the appropriate tag from the table in the Versions section below.

  • You can also replace octave-cli or octave --force-gui in the docker run command with bash to start your container at the shell prompt. From there you can, for example, start multiple GUI instances of Octave in the same container. Two useful aliases defined in the shell are ot and otg to start command-line and GUI versions of Octave, respectively.

  • You can also access Octave and MATPOWER in your running container from the command-line on your host machine via docker exec where the <container-name> can be found via docker container ls --all.

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

Versions

Several images are available with different combinations of MATPOWER and GNU Octave versions, with the following tags and naming conventions. Here current release means the most recent numbered release (currently 8.0 for MATPOWER, and 9.2.0 for Octave) and latest master refers to the most recent build from the master branch of the MATPOWER and MATPOWER Extras GitHub repositories.

tag MATPOWER version Octave version
development versions
dev-latest latest master current release
dev-<YYYY-MM-DD>-<x.y.z> master on date x.y.z
release versions
latest current release current release
<X.Y>c X.Y current release
8.0 8.0 9.1.0
7.1 7.1 5.2.0
7.0 7.0 5.1.0
6.0 6.0 4.2.2
5.1 5.1 4.0.3
5.0 5.0 4.0.3
4.1 4.1 4.0.3
4.0 4.0 4.0.3