Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what(): feval: function 'graphics_toolkit' not found #98

Open
OliverKleinBST opened this issue Jan 20, 2023 · 2 comments
Open

what(): feval: function 'graphics_toolkit' not found #98

OliverKleinBST opened this issue Jan 20, 2023 · 2 comments
Labels
multiplatform Multiplatform compatibility type/bug 🐛 Something isn't working what/toolkit/notebook Related to the native graphics toolkits

Comments

@OliverKleinBST
Copy link

  • xeus-octave version: GNU Octave, version 7.3.0, Octave was configured for "x86_64-conda-linux-gnu".
  • Operating System: JupyterHub, FROM jupyter/minimal-notebook:ubuntu-20.04

Description

When opening octave as Jupyterlab Notebook deployed as JupyterHub the kernel is crashing.
When I run the same container manually and just run jupyter lab the Notebook and Octaver kernel is working as expected.

Logs:
[D 2023-01-20 00:22:44.346 SingleUserLabApp manager:388] Starting kernel: ['/opt/conda/bin/xoctave', '-f', '/home/jovyan/.local/share/jupyter/runtime/kernel-a3e90551-2faa-4658-9417-f674c4cc7db2.json']
[D 2023-01-20 00:22:44.347 SingleUserLabApp connect:604] Connecting to: tcp://127.0.0.1:41797
GLFW Error: X11: The DISPLAY environment variable is missing (65544)
Cannot initialize GLFW
terminate called after throwing an instance of 'octave::execution_exception'
what(): feval: function 'graphics_toolkit' not found

What I Did

Open xoctave notebook.
@rapgenic
Copy link
Collaborator

I think this is because at the moment xeus-octave needs an X server to run.

We have solved this problem in our Binder demo by using xvfb-run, which creates a virtual X server.

If you're using a custom Dockerfile I'd suggest adding a line to install xvfb via apt, and then replacing the default

CMD ["start.sh"]

With something like

CMD ["xvfb-run start.sh"]

Note that I have not tested this specifically so you might need some trial and error to get this right.

An alternative could be creating editing the kernel.json file (which I think will be located in /opt/conda/share/jupyter/kernels/xoctave/kernel.json) and replace the:

  "argv": [
      "/opt/conda/bin/xoctave",
      "-f",
      "{connection_file}"
  ],

with something like:

  "argv": [  
      "/usr/bin/xvfb-run",
      "/opt/conda/bin/xoctave",
      "-f",
      "{connection_file}"
  ],

(Also not tested directly)

@rapgenic rapgenic added what/toolkit/notebook Related to the native graphics toolkits multiplatform Multiplatform compatibility type/bug 🐛 Something isn't working labels Jan 20, 2023
@jamarier
Copy link

jamarier commented Sep 2, 2023

Hi, I have same problem.

I looked for a Docker image with jupyter and xeus-octave, but I couldn't find any so I create mine.

My docker file is here.
Dockerfile.txt

I tried both approaches: modify kernel file description and command in docker file without success.

Is there any working dockerfile of jupyter with xoctave?

Edited: I forget to mention: my host machine has an nvidia graphic card but I am using docker (without docker-nvidia or other specialized versions for nvidia).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multiplatform Multiplatform compatibility type/bug 🐛 Something isn't working what/toolkit/notebook Related to the native graphics toolkits
Projects
None yet
Development

No branches or pull requests

3 participants