Skip to content

Add devcontainer.json for development with VS Code in a Docker container #33671

Closed

Description

@mkoeppe

https://code.visualstudio.com/docs/remote/containers

We add two new sections in the developer's guide:
https://47f8b984ef964a5aa34147393fbdc32e0dde88ad--sagemath-tobias.netlify.app/developer/portability_testing.html#using-our-pre-built-docker-images-published-on-ghcr-io

We also set up devcontainer configurations for the CoCalc and computop/sage Docker images, as well as downstream distribution packaging of Sage.

Tested devcontainer.json of

  • portability-ubuntu-jammy-standard: builds well; runs well
  • develop-docker-computop: builds well; runs well
  • downstream-docker-cocalc: builds well; runs well (except machines with the issue Do not require AVX when building with SAGE_FAT_BINARY #32434)
  • downstream-docker-computop: builds well; runs well
  • downstream-archlinux-latest: builds well; runs well
  • downstream-conda-forge-latest: builds well; runs well

Follow-ups:

Depends on #33873
Depends on #34352

CC: @tobiasdiez @dimpase @williamstein @culler @saraedum @kwankyu

Component: user interface

Author: Tobias Diez, Matthias Koeppe, Kwankyu Lee

Branch/Commit: 4affef2

Reviewer: Kwankyu Lee, Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/33671

Activity

  1. mkoeppe commented on Apr 10, 2022

    @mkoeppe
    Author
  2. mkoeppe commented on Apr 10, 2022

    @mkoeppe
    Author
  3. mkoeppe commented on May 11, 2022

    @mkoeppe
    ContributorAuthor

    Dependencies: #29536

  4. tobiasdiez commented on May 14, 2022

    @tobiasdiez
    Contributor

    Author: Tobias Diez

  5. tobiasdiez commented on May 14, 2022

    @tobiasdiez
    Contributor

    Commit: 85a7100

  6. tobiasdiez commented on May 14, 2022

    @tobiasdiez
    Contributor

    Changed dependencies from #29536 to none

  7. tobiasdiez commented on May 14, 2022

    @tobiasdiez
    Contributor
  8. tobiasdiez commented on May 14, 2022

    @tobiasdiez
    Contributor
    comment:5

    A basic devcontainer definition is now added for ubuntu systems.


    New commits:

    85a7100Add devcontainer for ubuntu
  9. sagetrac-git commented on May 14, 2022

    sagetrac-gitmannequin
    Mannequin

    Changed commit from 85a7100 to 11110ae

  10. sagetrac-git commented on May 14, 2022

    sagetrac-gitmannequin
    Mannequin

    Branch pushed to git repo; I updated commit sha1. New commits:

    11110aeAdd bootstrap
  11. sagetrac-git commented on May 14, 2022

    sagetrac-gitmannequin
    Mannequin

    Changed commit from 11110ae to c5295e3

  12. sagetrac-git commented on May 14, 2022

    sagetrac-gitmannequin
    Mannequin

    Branch pushed to git repo; I updated commit sha1. New commits:

    c5295e3enable-build-as-root
  13. tobiasdiez commented on May 14, 2022

    @tobiasdiez
  14. mkoeppe commented on May 14, 2022

    @mkoeppe
    ContributorAuthor
    comment:9

    Thanks! That's a beginning. Why do you not use the full build (-with-targets)?

  15. 406 remaining items

  16. kwankyu commented on Aug 22, 2022

    @kwankyu
    Collaborator
    comment:296

    Replying to @tobiasdiez:

    ... as I said above microsoft treats the codespaces as the defacto standard; so if its not working there then vscode will likely break in the future as well (and it will not work with other providers, such as devcontainer cli and gitpod). In fact, the vscode team works on using the same cli as codespaces,

    Would you comment on: #34403 comment:3 ?

  17. mkoeppe commented on Aug 22, 2022

    @mkoeppe
    ContributorAuthor
    comment:297

    Replying to @tobiasdiez:

    Sorry Matthias, but the original version of the code was working well with codespaces. I'm happy you further worked on it, but it's not fair that you introduce issues with codespaces and then say "I don't care, lets fix them in a follow up ticket".

    I've set the scope of the ticket to be actionable. Work on codespaces is not actionable for me. You want to support them, you do the work on the follow-up ticket.

  18. sagetrac-git commented on Aug 22, 2022

    sagetrac-gitmannequin
    Mannequin

    Changed commit from d5610b1 to 179406f

  19. sagetrac-git commented on Aug 22, 2022

    sagetrac-gitmannequin
    Mannequin

    Branch pushed to git repo; I updated commit sha1. New commits:

    179406fsrc/doc/en/developer/portability_testing.rst: Update references to devcontainer ...Command
  20. mkoeppe commented on Aug 22, 2022

    @mkoeppe
    ContributorAuthor
    comment:299

    Replying to @tobiasdiez:

    So what about deleting the portability dockerfile completely

    It's there as preparation for the following improvement (which is waiting for #29536):

    • always pull FROM the build stage -with-system-packages
    • then COPY the Sage SAGE_LOCAL (but not the old Sage source tree) from the requested build stage such as the default -with-targets
      This creates a smaller version of the container image.
  21. mkoeppe commented on Aug 22, 2022

    @mkoeppe
    Author
  22. sagetrac-git commented on Aug 22, 2022

    sagetrac-gitmannequin
    Mannequin

    Changed commit from 179406f to 4affef2

  23. sagetrac-git commented on Aug 22, 2022

    sagetrac-gitmannequin
    Mannequin

    Branch pushed to git repo; I updated commit sha1. New commits:

    4affef2.devcontainer/onCreate.sh, portability-updateContent.sh: Rename from post_create.sh, portability-post_start.sh
  24. mkoeppe commented on Aug 22, 2022

    @mkoeppe
    ContributorAuthor
    comment:302

    Replying to @tobiasdiez:

    the names of the "post" scripts need to be changed and the docs changed to reflect the recent changes of "onCreateCommand" etc.

    Thanks for catching this. Done now.

  25. kwankyu commented on Aug 24, 2022

    @kwankyu
    Collaborator
    comment:304

    Simple renaming. Positive again.

  26. vbraun commented on Aug 30, 2022

    @vbraun
    Member

    Changed branch from public/build/devcontainer to 4affef2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions