-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Versioned installation of threejs #30972
Comments
comment:1
I'm no expert on Python, especially the way implementations my differ, but it can access the local file system and Sage already has |
comment:2
That's not a solution because a user may want to use two different Sage versions at the same time. |
comment:3
Replying to @mkoeppe:
Why exactly would someone want to do this? I can see a user not wanting to upgrade to the newest version, but why would they use an older version when the newer one will almost certainly be an improvement? |
comment:4
Should we use JUPYTER_PATH for this kind of things? https://jupyter.readthedocs.io/en/latest/use/jupyter-directories.html |
comment:5
Replying to @paulmasson:
Users have complex needs. |
comment:6
Replying to @mkoeppe:
Considering that I don't even use Sage, I'll need a better answer than this before devoting more time to this issue. We are not required to support every feature desired by end users. We can simply tell them to run only one kernel at a time. Who is making the decision to support this option? |
comment:7
Replying to @kiwifb:
I don't think this can be solved by using environment variables. The issue is that the notebook may access different kernels when the kernelspec is installed, and (apparently) the notebook webserver is expected to serve the local threejs files. Now these files are kernel-specific (because they are tied to the sagelib version). Francois, how do you currently install these files in gentoo packaging? |
This comment has been minimized.
This comment has been minimized.
comment:9
For "sagelib" I disable https://github.com/sagemath/sage-prod/blob/develop/src/sage/repl/ipython_kernel/install.py#L281 because of the way I have to install documentation following Gentoo's guidelines (not everyone in Gentoo is happy with the current way of doing this) and I do the stuff from that line manually. For the rest, sagelib's kernel install is used - it wasn't always the case. I just change the kernel specs to use the current python directly. I don't support any versioning of sage whatsoever. Multiple pythons are supported and work thanks to the current Gentoo python infrastructure that supports it. But stuff in
Users who want versioning, usually are after reproducibility. In that case system packaging is not part of the solution. containers on the other are an ideal tool for that. |
Dependencies: #30915 |
comment:11
I would propose the following installation scheme in
|
comment:12
I would also propose to store the version of From a packaging point of view it makes no sense to read this from the |
Commit: |
comment:14
Here's a draft (untested) Last 10 new commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Author: Matthias Koeppe |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:20
I guess I can accomodate that. I already ship threejs as a sage specific component in |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:22
This version passes the testsuite. Manual testing would be appreciated. |
comment:38
Replying to @paulmasson:
Apologies. I did not realize there were outstanding questions about the use case's validity, of which I can not personally attest. Just saw that it was in review for awhile yet functioning 'correctly' (to ticket's spec). |
comment:39
Paul, if you have a specific technical objection to the change that this ticket proposes, it would probably be helpful for the discussion to try to articulate it. |
comment:40
Let's discuss what the ticket changes step by step.
for example in this change
Any concerns or objections to that? |
Changed branch from u/gh-jcamp0x2a/versioned_installation_of_threejs to u/mkoeppe/versioned_installation_of_threejs |
Changed dependencies from #30915 to none |
Changed reviewer from Joshua Campbell, Matthias Koeppe to Joshua Campbell, Matthias Koeppe, ... |
New commits:
|
comment:46
please rebase |
comment:47
Use cases for having several versions of Sage installed
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:49
Replying to @paulmasson:
for instance one can have two copies of Sage built with different compilers. At least for Sage development purposes it's very normal to have several installations of Sage on a box. |
comment:50
How does one test this with, say, jupyterlab installed by Homebrew? |
comment:51
Replying to @dimpase:
You would follow the instructions in our manual added in #30476 |
comment:52
Unfortunately these instructions are outdated: on macOS I get
|
comment:53
Looks to me like someone forgot to build the documentation |
Changed reviewer from Joshua Campbell, Matthias Koeppe, ... to Joshua Campbell, Matthias Koeppe, Dima Pasechnik |
comment:54
OK, this works, sorry for noise. |
comment:55
Thanks! |
Changed branch from u/mkoeppe/versioned_installation_of_threejs to |
From Matthias Koeppe on #30915:
When we start using Sage with a system jupyter notebook (Meta-ticket #30306), there is an issue involving the installation directory
share/jupyter/nbextensions/threejs
, and the fact that there will be several unrelated (and possibly mutually incompatible) copies of that.Here is an example.
Let's say:
/usr
, so the notebook server is accessing/usr/share/jupyter/nbextensions
./home/x/sage-9.x/local/
and may need threejs r122./home/x/sage-9.y/local/
and may need threejs r155.As @enriqueartal has reported in #30915, our offline threejs graphics needs
/usr/share/jupyter/nbextensions/threejs/
. But the system does not provide it -- it is only provided by Sage (and, after #30915 is the result of a custom build (fork) of threejs).If we create a symlink
/usr/share/jupyter/nbextensions/threejs
->/home/x/sage-9.x/local/share/jupyter/nbextensions/threejs
, then Sage 9.x will work with the system jupyter notebook; but Sage 9.y will not.This means that we need a versioned installation scheme so that offline threejs graphics can access the specific version it needs even if the user is accessing Sage through the system notebook.
In this ticket we also rename directories from
threejs
tothreejs-sage
(inshare/
andshare/jupyter/nbextensions/
) to reflect the fact that it is a Sage-specific fork. This will reduce the need for downstream patching.(On this ticket we ignore the separate issue that installing such symlinks is not user-friendly -- see #30123 Repackage Sage's cropped
threejs
as a pip-installable packagejupyter-threejs-sage
for a follow-up.)CC: @jcamp0x2a @kiwifb @mkoeppe @EmmanuelCharpentier @enriqueartal @jhpalmieri @seblabbe @antonio-rojas @defeo @novoselt @dimpase
Component: graphics
Keywords: threejs, jsmol, jupyter, sd111
Author: Matthias Koeppe, Joshua Campbell
Branch/Commit:
935dcef
Reviewer: Joshua Campbell, Matthias Koeppe, Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/30972
The text was updated successfully, but these errors were encountered: