alternative approach to distributing sage -- jupyterlab_app

131 views
Skip to first unread message

William Stein

unread,
Sep 15, 2021, 12:43:12 PM9/15/21
to sage-devel
Hi,

I don't know if there is any interest, but if you look at

https://github.com/jupyterlab/jupyterlab_app

it's a desktop app for JupyterLab with conda packages pre-installed,
and built cross platform (windows coming soon). There are some
binaries at the bottom of

https://github.com/jupyterlab/jupyterlab_app/actions/runs/1235190813

Presumably somebody could make a Sage version of this by changing what
Conda packages get installed and a little other configuration (e.g.,
the kernels)...

-- William

--
William (http://wstein.org)

Isuru Fernando

unread,
Sep 22, 2021, 2:50:45 PM9/22/21
to sage-devel, William Stein
This should be easy to set up.

I have a small POC that works for x86_64-apple-darwin (intel macs), arm64-apple-darwin (Apple silicon), x86_64-linux-gnu, aarch64-linux-gnu.
Signing is a bit tricky to set up.

curl -L -O https://github.com/isuruf/sagemath-forge/releases/latest/download/sagemath-forge-$(uname)-$(uname -m).sh
bash
sagemath-forge-$(uname)-$(uname -m).sh

William Stein

unread,
Sep 22, 2021, 3:49:47 PM9/22/21
to sage-devel, William Stein
Thanks -- that was certainly an *extremely easy command line
experience* regarding installing Sage on my Macbook M1! It does seem
to fully work as well.

On finish it says: "If you'd prefer that conda's base environment not
be activated on startup, set the auto_activate_base parameter to
false: conda config --set auto_activate_base false"

which I have to do because with it auto activated, every time I open
any terminal I have to wait to a count of maybe 7 while a bunch of
stuff happens before I get the shell prompt. So I'm going to disable
this by default, but of course just typing "conda activate" works to
get the sage env again.

Anyway, what you've just done is vastly better than anything anybody
else has done regarding making it possible to run Sage natively on an
M1 macbook during the last 10 months. You should make a little page
with these instructions, and there should be a link to your page from
(e.g.,)

https://mirror.csclub.uwaterloo.ca/sage/osx/index.html

which currently has zero support for M1 macbooks after all this time.

> Signing is a bit tricky to set up.

Is that mainly due to paying the Apple Developer subscription fee?

William
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CA%2B01voM-OmSos%2BS-8YEKP%3D%2BpCmDbS4BMnx-PL6L7wOJWaxX_%3DQ%40mail.gmail.com.



--
William (http://wstein.org)

Isuru Fernando

unread,
Sep 23, 2021, 1:51:39 AM9/23/21
to sage-devel, William Stein
On Wed, Sep 22, 2021 at 2:49 PM William Stein <wst...@gmail.com> wrote:
Thanks -- that was certainly an *extremely easy command line
experience* regarding installing Sage on my Macbook M1!   It does seem
to fully work as well.

On finish it says: "If you'd prefer that conda's base environment not
be activated on startup,  set the auto_activate_base parameter to
false:   conda config --set auto_activate_base false"

which I have to do because with it auto activated, every time I open
any terminal I have to wait to a count of maybe 7 while a bunch of
stuff happens before I get the shell prompt.   So I'm going to disable
this by default, but of course just typing "conda activate" works to
get the sage env again.

Sure, that works. I'm not sure which command is taking that long, but we should fix that if possible.


Anyway, what you've just done is vastly better than anything anybody
else has done regarding making it possible to run Sage natively on an
M1 macbook during the last 10 months.   You should make a little page
with these instructions, and there should be a link to your page from
(e.g.,)

https://mirror.csclub.uwaterloo.ca/sage/osx/index.html

which currently has zero support for M1 macbooks after all this time.

> Signing is a bit tricky to set up.

Is that mainly due to paying the Apple Developer subscription fee?

Yes, and the fact that I don't have a macOS machine with a GUI to try things out.
I only have access to a macOS machine through SSH.


William



On Wed, Sep 22, 2021 at 11:50 AM Isuru Fernando <isu...@gmail.com> wrote:
>
> This should be easy to set up.
>
> I have a small POC that works for x86_64-apple-darwin (intel macs), arm64-apple-darwin (Apple silicon), x86_64-linux-gnu, aarch64-linux-gnu.
> Signing is a bit tricky to set up.
>
> curl -L -O https://github.com/isuruf/sagemath-forge/releases/latest/download/sagemath-forge-$(uname)-$(uname -m).sh
> bash sagemath-forge-$(uname)-$(uname -m).sh
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CA%2B01voM-OmSos%2BS-8YEKP%3D%2BpCmDbS4BMnx-PL6L7wOJWaxX_%3DQ%40mail.gmail.com.



--
William (http://wstein.org)

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

Nathan Dunfield

unread,
Sep 24, 2021, 9:18:51 AM9/24/21
to sage-devel
> Signing is a bit tricky to set up.

Is that mainly due to paying the Apple Developer subscription fee?

Yes, and the fact that I don't have a macOS machine with a GUI to try things out.
I only have access to a macOS machine through SSH.

Maybe the conda or JupyterLab community has tools for this, but Marc Culler's experience with [1] is that getting the Apple Developer subscription solves at most 10% of the problem.  If one is building an application with Xcode, then signing is trivial, but for apps built with other tools it's a tedious trial-and-error process as Apple's documentation on what is allowed in a code-signed bundle is very poor.  You sign the code, upload to Apple, have it rejected, study the error message, and repeat.

Best,

Nathan



Dima Pasechnik

unread,
Sep 24, 2021, 10:42:04 AM9/24/21
to sage-devel

looks pretty informative as far as notarization is concerned. 


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

Isuru Fernando

unread,
Sep 24, 2021, 3:57:53 PM9/24/21
to sage-devel
> Maybe the conda or JupyterLab community has tools for this, but Marc Culler's experience with [1] is that getting the Apple Developer subscription solves at most 10% of the problem.  If one is building an application with Xcode, then signing is trivial, but for apps built with other tools it's a tedious trial-and-error process as Apple's documentation on what is allowed in a code-signed bundle is very poor.  You sign the code, upload to Apple, have it rejected, study the error message, and repeat.

We already have tools in conda to create a dmg. I just haven't tried it. For eg: https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-MacOSX-x86_64.pkg is built using open source tools. We can do the same for sage and build an image.

Isuru


Reply all
Reply to author
Forward
0 new messages