Closed LukasMueller187 closed 1 year ago
Thanks for the report, we will make that kernel installation more robust very soon, there is an open ticket about it here: https://github.com/oscar-system/Polymake.jl/issues/427 With these changes an error during the initialization will not be fatal anymore.
But these files (unfortunately) need to be in the resource_dir of the ijulia kernel, so unless these are put there manually, threejs visualization will not work in a notebook.
I have just created a PR for this, https://github.com/oscar-system/Polymake.jl/pull/431 This will still print a warning if only such a global (read-only) resource directory exists and the files are not there. We need:
close.svg
menu.svg
OrbitControls.js
Projector.js
SVGRenderer.js
three.js
TrackballControls.js
WebGL.js
from
const _jupyter_resources = joinpath(polymake_jll.artifact_dir, "share",
"polymake", "resources", "jupyter-polymake",
"jupyter_kernel_polymake", "resources")
Thanks for the response and the changes!
Yep I did manage to fix it after your message that there is no e. g. env variable to force another directory. I was sceptical due to not knowing whether the files are suitable for read-only global files. But it seems that they are suitable and need not to be written to by the user. I simply copied the files to:
/usr/local/share/jupyter/kernels/julia-1.8
├── kernel.json
├── logo-32x32.png
├── logo-64x64.png
├── logo-svg.svg
└── polymake
├── close.svg
├── menu.svg
├── OrbitControls.js
├── Projector.js
├── SVGRenderer.js
├── three.js
├── TrackballControls.js
└── WebGL.js
Maybe Polymake should behave somehow like the matplotlib backend ipympl (which is an nbextension?) and or the IJulia kernel should behave similar to ipython which does write locally in ~/.ipython
. But that's just an idea and for sure a lot of work (and more of an IJulia topic).
Note: this will likely break again as soon as there are new versions of the files that are needed for an updated version.
Thanks for the hint, converting our threejs stuff into an nbextension might indeed work and improve this setup. I wasn't really aware what those do, the documentation seems a bit sparse.
The IJulia kernel is by default installed into $HOME/.local/share/jupyter
which is why this usually doesn't cause problems.
Hi,
I'm trying to make OSCAR available precompiled in a multi user environment (JupyterHub). The kernel is living in
/usr/local/share/jupyter/kernels/julia-1.8
, therefore global (state of the art).Calling
using Oscar
throws:As stated in the stacktrace,
ijulia.jl
is trying to write in the global kernel directory (or called resource_dir by kernelspec, see line 31). This is of course not possible for the user. I didn't find any environments variables to set in order to direct the IJulia part of Polymake to write into the home directory.Any ideas?
Best regards