-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Functionality we have in sum
This issue continues #1 (comment).
FYI: I made some major changes in my approach. I got rid of Docker Desktop replacing it by a custom WSL distribution based on Alpine Linux. This makes the installation much easier, faster and less resource consuming and reduces startup-time.
How do we want to proceed here?
We have five codebases:
A) the one by @saraedum, which is developed for flatsurf and installs Sage as a custom WSL distribution.
B) the one by @kwankyu, which is developed in the sage-binder repository and installs Sage as a custom WSL distribution, too.
C) the one by @soehms, which is developed as an example for a projects docker guide and installs Sage via Docker in a custom WSL Docker distribution.
D) the one by @tobiasdiez, which is developed via a native Windows build of Sage using meson (see sagemath/sage#38872 and #1 (comment) below).
E) the one by @culler, which is developed as an AppImage. Similar to A-C, it depends on the availability of WSL. A manylinux2014
-compatible Linux distribution is required (see https://github.com/3-manifolds/sage_appimage/releases).
All except D) have in common that they need a working WSL installation and this is the hardest part of the installation and most sensitive to system requirements. Let me try to summarize what we have in total (please correct me if I'm wrong):
1. Installing WSL
1.1 detection of state
A) Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux / VirtualMachinePlatform
B) try .. catch with wsl --install --no-distribution
C) wsl --status
1.2 installation
A) Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux / VirtualMachinePlatform -NoRestart
B) wsl --install --no-distribution
C) wsl --install --no-distribution
1.3 handling of reboot (if necessary)
A) InnoSetup asks you to reboot and otherwise it doesn't continue. It adds the installer to the autostart so that the installation continues after the reboot.
B) Print a hint that reboot could be necesarry.
C) Query for reboot if it is necessary and perfom it if the user agrees. Give a hint that the installer must be restarted after reboot.
1.4 detection that virtualization needs to be enabled in BIOS.
A) -
B) -
C) Via result from wsl --import.
1.5 Update WSL kernel
A) Using msi wsl_update_x64.msi
B) -
C) -
E) not supported, yet
2. Setting up the custom WSL distribution.
A) Using wsldl to create a custom distribution for each Sage release from a tar-file created by Pixi (see link below)
B) Using wsl --import to create a custom distribution for each Sage release from a tar-file exported from a Docker container.
C) Using wsl --import to create a custom distribution with a running Docker daemon (Docker for Powershell) from a tar-file exported from a Docker container.
E) not supported, yet
3. Installation method
A) Install-Wizard created by Inno Setup
B) Invoking a Powershell script
C) Invoking a Powershell script
D) not yet known
E) manually, but easy if there is an appropriate WSL distrubution
4. Launching Sage
A) Create three desktop icons to launch an IPython, JupyterLab or Bash environment to work with Sage
B) Create two desktop icons to launch an IPython or JupyterLab environment to work with Sage
C) Create one desktop icon to launch a special application which allows to install arbitrary Sage releases from registries on Docker Hub and launch Ipython, Jupyter-Notebook (Lab needs an adaption in our Docker images) or Bash environments to work with Sage.
D) not yet known
E) as for Linux inside the WSL-distribution
From a user perspective, there is hardly any difference between A) and B) (asuming equal resource consumption). Therefore, I think it makes sense to consolidate the two approaches. From a technical perspective, both approaches have different advantages:
A) Is implemented as part of installers for Linux, Mac and Windows and uses a common base via Pixi.
B) Is implemented in a more down-to-earth way and therefore easier to understand.
Is there a way to merge these two approaches? Maybe it would make sense to include 1.4 here as well. For C) it would be nice to have 1.5 and 3. (creating an install-wizard using Inno Setup) as per A). Is there a way to share the WSL installation across all four approaches?