Skip to content
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

Installation Guide: Document Sage installation on Windows via VS Code dev containers #37534

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

mkoeppe
Copy link
Member

@mkoeppe mkoeppe commented Mar 3, 2024

Preview: https://doc-pr-37534--sagemath.netlify.app/html/en/installation/#using-visual-studio-code-with-sagemath-dev-containers

Fixes #34363

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@mkoeppe mkoeppe self-assigned this Mar 3, 2024
@mkoeppe mkoeppe force-pushed the t/34363/installation_guide__document_sage_installation_on_windows_via_vs_code_devcontainers branch from 78d0ccf to 98c693a Compare March 5, 2024 03:09
@mkoeppe mkoeppe requested a review from kcrisman March 6, 2024 03:12
@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 6, 2024

@kcrisman If you are able to get another time allotment on the household supercomputer...

@kcrisman
Copy link
Member

kcrisman commented Mar 6, 2024

Wow, this looks ridiculously more complicated than the other method. Even for people with less Linux experience. Are we sure this should be the first method suggested? Note the several dense paragraphs (including one about licenses) before even getting to the virtualization bullet point.

On a more specific note, "The extension will walk you through the installation of Docker Desktop and activating Windows Subsystem for Linux (WSL 2)." but the change earlier says this is specifically for people who can't use WSL.


Even less related, but convenient to put here since the other ticket is baked, I note that while we have the useful sections now, it just says "Pick one of the following sections." Maybe there should be a very brief rst list there for people to click through to. The list as it stands is getting a bit long for convenience, so that would be helpful (not necessarily on this ticket).


Also, for anyone reading this, see the long discussion at #34363 which, however, failed to enlighten me as to which approach is actually better for non-POSIX-familiar Windows users. My gut says that "very explicit instructions which don't require many downloads and extensions" is going to be better than "links to download a lot of other stuff and then install it, plus Command Palettes and making a subfolder named .devcontainer." It would take some experimentation to see which one is actually better. I do think it's fine if both of them are documented, to be clear, and I'm certainly glad that we don't need Cygwin and other such solutions any more (though props to those who spent so many hours making those solutions work!).

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 6, 2024

this looks ridiculously more complicated than the other method. Even for people with less Linux experience. Are we sure this should be the first method suggested?

I honestly don't know. This hasn't been field-tested.

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 6, 2024

Even less related, but convenient to put here since the other ticket is baked, I note that while we have the useful sections now, it just says "Pick one of the following sections." Maybe there should be a very brief rst list there for people to click through to.

I'll do that at here for the two sections.

@kcrisman
Copy link
Member

kcrisman commented Mar 6, 2024

I'll do that at here for the two sections.

Having the list for Mac, Windows, Linux (three sections) would be particularly useful. (Maybe I misread what you intended with "two sections"?)

@kcrisman
Copy link
Member

kcrisman commented Mar 6, 2024

I honestly don't know. This hasn't been field-tested.

Okay, probably we should test it first then (which you already asked for) and I may report back. Just going with my hunch on this so far.

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 6, 2024

I'll do that at here for the two sections.

Having the list for Mac, Windows, Linux (three sections) would be particularly useful. (Maybe I misread what you intended with "two sections"?)

I meant for the two subsections of the Windows section. (Done in f97b622.)

@jhpalmieri
Copy link
Member

I am writing as a representative of the Sage Conduct Committee to record a -1 vote from Tobias.

@kcrisman
Copy link
Member

I am writing as a representative of the Sage Conduct Committee to record a -1 vote from Tobias.

Hi, can you clarify if that means "-1 for this PR to be merged in the current form", in which case some rationale would be helpful, or does that mean something else? I'm trying to get up to speed with the whirlwind changes around the Conduct business 😦 sorry, appreciate the clarification.

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 11, 2024

Whatever the process, it is important that other reviewers do not feel intimidated by it.

@mkoeppe mkoeppe force-pushed the t/34363/installation_guide__document_sage_installation_on_windows_via_vs_code_devcontainers branch from f97b622 to 318f5f3 Compare March 11, 2024 17:38
@jhpalmieri
Copy link
Member

jhpalmieri commented Mar 11, 2024

I am writing as a representative of the Sage Conduct Committee to record a -1 vote from Tobias.

Hi, can you clarify if that means "-1 for this PR to be merged in the current form", in which case some rationale would be helpful, or does that mean something else? I'm trying to get up to speed with the whirlwind changes around the Conduct business 😦 sorry, appreciate the clarification.

It means that, to the extent that the PR is disputed, this is one vote against merging it (re the discussion/vote in sage-devel about disputed tickets). I have asked Tobias to contact you, Karl-Dieter, as someone involved in the ticket, to communicate more details. (The vote of "-1" was received before some of the changes to the PR, for what that's worth.)

@kcrisman
Copy link
Member

kcrisman commented Mar 11, 2024 via email

@kcrisman
Copy link
Member

I am writing as a representative of the Sage Conduct Committee to record a -1 vote from Tobias.

Hi, can you clarify if that means "-1 for this PR to be merged in the current form", in which case some rationale would be helpful, or does that mean something else?

Followup: In this comment some of that was explained, and indeed agrees with my suspicion that this is a pretty onerous way to install. Unfortunately I didn't have time to try it out on Windows this weekend, and this week looks bad too, but I would like to verify that it works (and how easy it is by comparison) before formally committing to that.

@mkoeppe
Copy link
Member Author

mkoeppe commented Mar 12, 2024

Thanks @kcrisman. There's no urgency here, this one for sure won't make it into Sage 10.3.

Regarding the usability of this approach, it is best if it is independently tried by several people.

I have another PR in prep as a follow-up: #37541, which would replace the awkward step of copying files from the repo by hand.

vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 24, 2024
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
We streamline the installation instructions for Windows by including
conda-forge instructions.

[Sage is stuck at version 9.5 in
Ubuntu](https://repology.org/project/sagemath/versions), the default
Linux distribution on WSL, so this should not be our primary
recommendation.

Preview: https://deploy-preview-37184--
sagemath.netlify.app/html/en/installation/

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

## Alternatives / follow-ups:
- Include a link to Microsoft Store search for Linux distros -
https://www.microsoft.com/en-
us/search/shop/apps?price=0&q=linux&devicetype=pc
- Include a link to Arch WSL in Microsoft Store -
https://apps.microsoft.com/detail/9MZNMNKSM73X?hl=en-us&gl=US -- this is
the only Linux distro in the Microsoft Store that has up-to-date
SageMath packaging
- Include a link to "Import any Linux distribution to use with WSL" --
https://learn.microsoft.com/en-us/windows/wsl/use-custom-distro -- these
instructions should work with any Docker image, so many options
- Create a WSL launcher app -- https://github.com/Microsoft/WSL-
DistroLauncher, and document how users can "sideload" it --
https://learn.microsoft.com/en-us/windows/wsl/build-custom-
distro#sideloading-a-custom-linux-distro-package
- Create a WSL launcher app and publish it to the Microsoft Store --
https://github.com/Microsoft/WSL-DistroLauncher?tab=readme-ov-
file#publishing
- sagemath#34286
- sagemath#37534

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
- Depends on sagemath#37588 (merged here)

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37184
Reported by: Matthias Köppe
Reviewer(s): kcrisman, Matthias Köppe, Tobias Diez
…tion_guide__document_sage_installation_on_windows_via_vs_code_devcontainers
Copy link

github-actions bot commented Mar 26, 2024

Documentation preview for this PR (built with commit aea368e; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@soehms
Copy link
Member

soehms commented Mar 28, 2024

Wow, this looks ridiculously more complicated than the other method. Even for people with less Linux experience. Are we sure this should be the first method suggested? Note the several dense paragraphs (including one about licenses) before even getting to the virtualization bullet point.

On a more specific note, "The extension will walk you through the installation of Docker Desktop and activating Windows Subsystem for Linux (WSL 2)." but the change earlier says this is specifically for people who can't use WSL.

Even less related, but convenient to put here since the other ticket is baked, I note that while we have the useful sections now, it just says "Pick one of the following sections." Maybe there should be a very brief rst list there for people to click through to. The list as it stands is getting a bit long for convenience, so that would be helpful (not necessarily on this ticket).

Also, for anyone reading this, see the long discussion at #34363 which, however, failed to enlighten me as to which approach is actually better for non-POSIX-familiar Windows users. My gut says that "very explicit instructions which don't require many downloads and extensions" is going to be better than "links to download a lot of other stuff and then install it, plus Command Palettes and making a subfolder named .devcontainer." It would take some experimentation to see which one is actually better. I do think it's fine if both of them are documented, to be clear, and I'm certainly glad that we don't need Cygwin and other such solutions any more (though props to those who spent so many hours making those solutions work!).

I competely share these apprehensions. I went through the instructions and I found it much harder as installing and using Sage directly under WSL (see #37029 (comment)). If we declare this as the default installation method on Windows, then we send people with no development experiences into the jungle even though they are just interested in one tree. For these people that would be rather repulsive and frustrating.

I think it would by much easier (still not easy) to save people from installing VS Code and let them run Sage directly in Docker-Desktop (which needs to be installed for VS Code, too). The difficulty then, of course, is copying files from the Windows file system to the container and back. Is there a way to make this more convenient for example by implementing a Docker-Desktop extension for Sage?

Another option could be to use appropriate Docker commands (for example the mount option) in specific entry and closing scripts within a Windows bash (or powershell to reduce requirements) terminal. Of course, this way we could also simplify the use of the native WSL approach.

…_installation_on_windows_via_vs_code_devcontainers
@mkoeppe mkoeppe added this to the sage-10.5 milestone Aug 5, 2024
…_installation_on_windows_via_vs_code_devcontainers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installation guide: Document Sage installation on Windows via VS Code devcontainers
5 participants