Sign inSign up

gnuoctave/octave

By gnuoctave

•Updated 4 months ago

Docker images of GNU Octave

Image
10

100K+

gnuoctave/octave repository overview

⁠Docker images of GNU Octave

The Octave images can be run by

  • Docker⁠:
    # Obtain image
    
    docker pull docker.io/gnuoctave/octave:9.2.0
    
    # Start container (command-line interface)
    
    docker run -it --rm gnuoctave/octave:9.2.0 octave
    
  • Podman⁠: as before, replace docker with podman.
  • Singularity⁠: most recommended for GUI mode.
    singularity pull docker://gnuoctave/octave:9.2.0
    
    # Start container (command-line interface)
    
    singularity run octave_9.2.0.sif
    

See below for starting Octave with GUI.

⁠Easy installation

An installation script is provided, that can be called directly with this shell command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/gnu-octave/docker/main/install.sh)" -t docker

To remove the installation, type:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/gnu-octave/docker/main/install.sh)" -u -f

It creates links in $HOME/bin, as well as a Desktop entry, to start the Octave as if it was installed by the Linux distribution.

Note: The system must have either Docker (= Podman) or Singularity installed and the user account must be setup to use those tools properly. Please adapt the shell command after -t respectively.

⁠Starting the Octave GUI

Using Singularity, start Octave with GUI with this command:

singularity exec --bind /run/user octave_9.2.0.sif octave --gui

Using Docker or Podman run:

docker run \
  --rm \
  --network=host \
  --env="DISPLAY" \
  --env="HOME=$HOME" \
  --env="XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" \
  --user $(id -u):$(id -g) \
  --volume="$HOME:$HOME:rw" \
  --volume="/dev:/dev:rw" \
  --volume="/run/user:/run/user:rw" \
  --workdir="$HOME" \
  docker.io/gnuoctave/octave:9.2.0 octave --gui

For old Octave 4.x.x versions you might additionally pass the --env=QT_GRAPHICSSYSTEM=native environment variable.

The following error results from a missing $HOME/.Xauthority file:

Authorization required, but no authorization protocol specified
octave: unable to open X11 DISPLAY
octave: disabling GUI features

Create this file via ln -s -f "$XAUTHORITY" $HOME/.Xauthority.

Note: The best experience was made with Singularity and Docker. Podman had several flaws when run as unprivileged (non-root) user.

Note: The "Easy installation" described above does a few tweaks to the docker run command to enable parallel usage of multiple Octave versions and sudo-support for the non-root user.

⁠Further reading

Tag summary

Content type

Image

Digest

sha256:b22abbe60…

Size

1.4 GB

Last updated

4 months ago

docker pull gnuoctave/octave