SageMath and Jupyter via micromamba

Post tutorials, HOWTO's and other useful resources here.
rych
Warlord
Warlord
Posts: 621
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

SageMath and Jupyter via micromamba

Post#1 by rych » 24 Sep 2022, 10:32

For the fellow research programmers, I can share my setup steps for setting up the Sage environment. It's heavy, around 10 GB, so first you'd have to think where you'd be installing it. It's possible to put it onto a USB3 stick, but it's better be a fast one. Installation will take some time in which using Porteus from the same USB is going to be very slow -- so better go have a tea. Turning this installation into an xzm module could be even more cumbersome and/or silly?

The first step would be to install a small micromamba package manager. It's going to manage our sage env. It could also manage a separate python, jupyter and other envs. But if installing sage -- sage will have its own python and jupyter inside, in addition to tons of other scientific programming libraries.

After a successful installation, I simply run a script "sage": the kernel web server starts, and the Firefox opens up with my Sage (and pure Python, or potentially Julia etc.) notebooks.

Let me know if anyone (really) needs it.

SageMath is a free alternative to Mathematica and Matlab -- which I also successfully run under Porteus by the way. None of those huge Environments can be implemented as modules I guess, so I installed them portable frugal onto a fast USB. The recommendation though is to install them on a proper SSD of course, so if you have access, you could intstall on the host disk, even if it carries NTFS.

The important step 0 is that the installation path must be persistent between reboots, and the symbolic links are not enough. See Permanent device/mount name for a USB disk and Porteus USB always mounted as /mnt/porteus. Once you have a persistent mount node say /C on your file system -- installations can begin.