matpower/octave

Sponsored OSS

By matpower

Updated 9 months ago

A complete GNU Octave environment, with IPOPT, OSQP, SeDuMi, SDPT3

Image
Data Science
Languages & Frameworks
0

1.5K

MATPOWER's Octave Docker Image

A complete GNU Octave environment is available in a Docker container by using the matpower/octave image on Docker Hub. This image is used as base for the MATPOWER Docker image (matpower/matpower) and consists of the corresponding official GNU Octave image (gnuoctave/octave) with MEX interfaces for several optimization packages pre-installed.

Specifically, the following packages are included, depending on the version of the Octave image being used.

Octave VersionIPOPTOSQPSeDuMiSDP3YALMIP
9.x.x
8.x.x
7.x.x
6.x.x
5.x.x
4.4.x
4.2.x
4.0.x

All packages are built from the latest versions of the source from GitHub, except YALMIP, which uses R20180817.

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 Octave Docker image
docker pull docker.io/matpower/octave:latest
2. Start Octave in the container

command line only

docker run -it --rm matpower/octave: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/octave:latest octave --force-gui

This runs Octave in your newly launched Docker container, with the included packages already installed in the Octave path.

3. Exectute Octave commands

For example ...

ver

Additional Notes

  • To run a different version of Octave, replace the latest tag with the appropriate available version tag.

  • 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 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
    

Docker Pull Command

docker pull matpower/octave