Example repository to create an environment with course materials in Octave.
The Octave kernel is provided by Calysto.
In JupyterLab, open a terminal and type :
octave --version
You should have an output similar to:
$ octave --version
octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
GNU Octave, version 7.1.0
Copyright (C) 1993-2022 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
Octave was configured for "x86_64-conda-linux-gnu".
Additional information about Octave is available at https://www.octave.org.
Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html
Read https://www.octave.org/bugs.html to learn how to submit bug reports.
Warnings:
octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
do not prevent graphics to be dislayed in Jupyter notebook.
Also do check octave kernel is available:
$ jupyter kernelspec list
Available kernels:
octave /srv/conda/envs/notebook/share/jupyter/kernels/octave
python3 /srv/conda/envs/notebook/share/jupyter/kernels/python3
With Octave running, either from a console or a notebook, install needed packages:
pkg install -local -forge io statistics struct optim
This will take a couple of minutes, be patient. Warning message will also be printed.
Then list available packages:
pkg list
And test the optim
package:
pkg test optim
This repository is based on the binder-examples/conda example.
repo2docker
is the underlying tool that is used to build an environment from a repository.
repo2docker
can be configured with several types of files. In the case of this repo:
binder/environment.yml
: specify dependencies that will be installed usingconda
binder/apt.txt
: specify regular Ubuntu packages that will be installed usingapt
Once created, the environment can be reused without building it again.
For more information, see the extensive rep2docker documentation.
Materials can be added anywhere to this repository, either at the top level or in subdirectory.
When building the environment, the materials (and any other file) will be copied to the Docker image.
In this example, there is already a test notebook available under example-notebook-octave.ipynb
.