- DockerHub: https://hub.docker.com/r/gnuoctave/octave
- GitHub: https://github.com/gnu-octave/docker
The Octave images can be run by
- Docker:
# Obtain image docker pull docker.io/gnuoctave/octave:7.2.0 # Start container (command-line interface) docker run -it --rm gnuoctave/octave:7.2.0 octave
- Podman: as before, replace
docker
withpodman
. - Singularity: most recommended for GUI mode.
singularity pull docker://gnuoctave/octave:7.2.0 # Start container (command-line interface) singularity run octave_7.2.0.sif
See below for starting Octave with GUI.
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)" install -t singularity
To remove the installation, type:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/gnu-octave/docker/main/install.sh)" install -u -t singularity
It creates links in $HOME/bin
,
as well as Desktop entries,
to start the Octave and JupyterLab
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.
Using Singularity, start Octave with GUI with this command:
singularity exec --bind /run/user octave_7.2.0.sif octave --gui
Using Docker or Podman run:
docker run \
--rm \
--network=host \
--env="DISPLAY" \
--env="XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" \
--env="NB_USER=$USER" \
--env="NB_UID=$(id -u)" \
--env="NB_GID=$(id -g)" \
--env="GRANT_SUDO=yes" \
--user root \
--volume="$HOME:$HOME:rw" \
--volume="/dev:/dev:rw" \
--volume="/run/user:/run/user:rw" \
docker.io/gnuoctave/octave:7.2.0 start.sh octave --gui
For old Octave 4.x.x versions you might additionally pass the
--env=QT_GRAPHICSSYSTEM=native
environment variable.
Note: The best experience was made with Singularity and Docker. Podman had several flaws when run as unprivileged (non-root) user.
graph LR
U4[ubuntu:<b>2204</b>] --> b7[docker.io/gnuoctave/octave-build:<b>7</b>];
U3[ubuntu:<b>2004</b>] --> b6[docker.io/gnuoctave/octave-build:<b>6</b>];
U2[ubuntu:<b>1804</b>] --> b5[docker.io/gnuoctave/octave-build:<b>5</b>];
U1[ubuntu:<b>1604</b>] --> b4[docker.io/gnuoctave/octave-build:<b>4</b>];
b7 --> v720[docker.io/gnuoctave/octave:<b>7.2.0</b>];
b7 --> v710[docker.io/gnuoctave/octave:<b>7.1.0</b>];
b6 --> v640[docker.io/gnuoctave/octave:<b>6.4.0</b>];
b6 --> v630[docker.io/gnuoctave/octave:<b>6.3.0</b>];
b6 --> v620[docker.io/gnuoctave/octave:<b>6.2.0</b>];
b6 --> v610[docker.io/gnuoctave/octave:<b>6.1.0</b>];
b5 --> v520[docker.io/gnuoctave/octave:<b>5.2.0</b>];
b5 --> v510[docker.io/gnuoctave/octave:<b>5.1.0</b>];
b5 --> v441[docker.io/gnuoctave/octave:<b>4.4.1</b>];
b5 --> v440[docker.io/gnuoctave/octave:<b>4.4.0</b>];
b4 --> v422[docker.io/gnuoctave/octave:<b>4.2.2</b>];
b4 --> v421[docker.io/gnuoctave/octave:<b>4.2.1</b>];
b4 --> v420[docker.io/gnuoctave/octave:<b>4.2.0</b>];
b4 --> v403[docker.io/gnuoctave/octave:<b>4.0.3</b>];
b4 --> v402[docker.io/gnuoctave/octave:<b>4.0.2</b>];
b4 --> v401[docker.io/gnuoctave/octave:<b>4.0.1</b>];
b4 --> v400[docker.io/gnuoctave/octave:<b>4.0.0</b>];
v720 --> jl[docker.io/gnuoctave/octave:<b>jupyterlab</b>];
classDef U fill:#ff7f24,stroke:#333,stroke-width:2px;
class U1 U;
class U2 U;
class U3 U;
class U4 U;
classDef b fill:#ff0,stroke:#333,stroke-width:2px;
class b4 b;
class b5 b;
class b6 b;
class b7 b;
classDef age1 fill:#9aff9a,stroke:#333,stroke-width:2px;
classDef age2 fill:#7fffd4,stroke:#333,stroke-width:2px;
classDef age3 fill:#fff68f,stroke:#333,stroke-width:2px;
classDef age4 fill:#ffd700,stroke:#333,stroke-width:2px;
classDef age5 fill:#ffa500,stroke:#333,stroke-width:2px;
classDef age6 fill:#ff6a6a,stroke:#333,stroke-width:2px;
class jl age1;
class v720 age1;
class v710 age1;
class v640 age2;
class v630 age2;
class v620 age2;
class v610 age2;
class v520 age3;
class v510 age3;
class v441 age4;
class v440 age4;
class v422 age5;
class v421 age5;
class v420 age5;
class v403 age6;
class v402 age6;
class v401 age6;
class v400 age6;
- https://siko1056.github.io/blog/2021/06/10/octave-docker.html A longer blog article about this project including descriptions how to use and customize these images for specific needs.