Closed mkoeppe closed 2 years ago
Description changed:
---
+++
@@ -1 +1 @@
-
+https://code.visualstudio.com/docs/remote/containers
Description changed:
---
+++
@@ -1 +1,4 @@
https://code.visualstudio.com/docs/remote/containers
+
+see also https://github.com/gitpod-io/gitpod/issues/7721
+
Dependencies: #29536
Author: Tobias Diez
Commit: 85a7100
Changed dependencies from #29536 to none
Branch: public/build/devcontainer
A basic devcontainer definition is now added for ubuntu systems.
New commits:
85a7100 | Add devcontainer for ubuntu |
Branch pushed to git repo; I updated commit sha1. New commits:
11110ae | Add bootstrap |
Branch pushed to git repo; I updated commit sha1. New commits:
c5295e3 | enable-build-as-root |
Description changed:
---
+++
@@ -1,4 +1,3 @@
https://code.visualstudio.com/docs/remote/containers
-see also https://github.com/gitpod-io/gitpod/issues/7721
-
+Can be tested by starting a codespace at https://github.com/codespaces/new?hide_repo_select=true&ref=public%2Fbuild%2Fdevcontainer&repo=302607352&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json (might not be possible for everyone as codespaces is still in the test phase).
Thanks! That's a beginning. Why do you not use the full build (-with-targets
)?
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
58e112a | bootstrap-conda: Use script package _develop instead of hardcoded list of dev tools; remove unused RECOMMENDED |
21e06c5 | bootstrap-conda: Write an additional comment |
4290b11 | Add pytest-xdist package |
a365828 | build/pkgs/pytest/dependencies: Add missing dep |
a2e396b | build/pkgs/pytest_xdist/dependencies: Add missing dep |
2ec0061 | Merge #33825 |
5857902 | build/pkgs/_develop/dependencies: Add pytest, pytest_xdist |
2368adc | bootstrap-conda: Write an additional comment (fixup) |
0df31a9 | bootstrap-conda: Rewrite using fewer redirects |
872c0c8 | .devcontainer: Generalize to other distros |
Changed author from Tobias Diez to Tobias Diez, Matthias Koeppe
Dependencies: #33825
Changed dependencies from #33825 to #33851
Replying to @mkoeppe:
Thanks! That's a beginning. Why do you not use the full build (
-with-targets
)?
I didn't saw the point in that. In contrast to gitpod you don't know which version of sage the developer will use in the devcontainer, especially since devcontainer are cached by vscode until they are manually rebuild.
You also don't know that on gitpod, as I've explained in #33113 comment:18
Anyway, I've made it configurable
There are some problems when running this from a locally configured source tree, I'll try to find a solution for this.
Branch pushed to git repo; I updated commit sha1. New commits:
765dff7 | Merge #33740 |
ccbc21a | bootstrap, bootstrap-conda, src/doc/bootstrap: Use build/bin/sage-package directly |
4560895 | src/doc/Makefile: Remove explicit use of SAGE_ROOT and the top-level sage script |
7759f3c | Generate en/reference/repl/options.txt at build time, not bootstrap time |
58ab878 | bootstrap-conda: Fix typo, generate->generating to match messages from bootstrap |
02f2460 | Merge #33851 |
Replying to @mkoeppe:
There are some problems when running this from a locally configured source tree, I'll try to find a solution for this.
Fixed in #33852, merged via #33851
Branch pushed to git repo; I updated commit sha1. New commits:
d08ff6f | .devcontainer/devcontainer.json: Use configure --prefix |
Branch pushed to git repo; I updated commit sha1. New commits:
eb52e25 | .devcontainer/devcontainer.json: Install python extension |
I doesn't make sense to add those two packages to the _develop
package. They are not needed to create a devcontainer, but have to be installed into the devcontainer to work with vscode. Thus they should only be listed in the devcontainer/Dockerfile.
Moreover, git should be installed (and configured) through the "feature" flag: https://code.visualstudio.com/docs/remote/containers#_dev-container-features-preview
Replying to @tobiasdiez:
I doesn't make sense to add those two packages to the
_develop
package. They are not needed to create a devcontainer, but have to be installed into the devcontainer to work with vscode.
Hm? That's exactly what is done.
Yes, git is still missing.
Branch pushed to git repo; I updated commit sha1. New commits:
a6777bc | build/pkgs/_develop/distros/debian.txt: Add git here for now |
I haven't tested other distros yet. Need to add corresponding .txt files.
Replying to @mkoeppe:
Replying to @tobiasdiez:
I doesn't make sense to add those two packages to the
_develop
package. They are not needed to create a devcontainer, but have to be installed into the devcontainer to work with vscode.Hm? That's exactly what is done.
They are now added to this virtual develop package, which is meant for "useful stuff for developers". But these two packages are needed by vscode and thus should only be mentioned in the corresponding dockerfile, and not in the virtual develop package.
Replying to @tobiasdiez:
They are now added to this virtual develop package, which is meant for "useful stuff for developers". But these two packages are needed by vscode and thus should only be mentioned in the corresponding dockerfile, and not in the virtual develop package.
I don't want to go back to maintaining separate Dockerfiles for the various distributions.
I can of course create a separate script package "_devcontainer" for this purpose. Not sure if it really has to be so fine-grained.
Branch pushed to git repo; I updated commit sha1. New commits:
44493f0 | .vscode/extensions.json: Recommend extension 'Remote - Containers' |
Replying to @mkoeppe:
Replying to @tobiasdiez:
They are now added to this virtual develop package, which is meant for "useful stuff for developers". But these two packages are needed by vscode and thus should only be mentioned in the corresponding dockerfile, and not in the virtual develop package.
I don't want to go back to maintaining separate Dockerfiles for the various distributions.
I can of course create a separate script package "_devcontainer" for this purpose. Not sure if it really has to be so fine-grained.
There is no need for a new package, just put it in a switch/if statement for the different systems in the devcontainer dockerfile.
I have built this reusable infrastructure so that it can be reused. It's OK if you don't like it, but that does not make it "needs_work".
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
ofportability-ubuntu-jammy-standard
: builds well; runs welldevelop-docker-computop
: builds well; runs welldownstream-docker-cocalc
: builds well; runs well (except machines with the issue #32434)downstream-docker-computop
: builds well; runs welldownstream-archlinux-latest
: builds well; runs welldownstream-conda-forge-latest
: builds well; runs wellFollow-ups:
34363 Installation guide: Document installation on Windows via devcontainer
34286 Cookiecutter for Sage user projects with devcontainer
34403 GitHub Codespaces - may also be able to test it by starting a codespace at https:https://user-images.githubusercontent.com/5037600/216875765-6697bbf8-70f9-4acc-868e-9309db67be92.jpg/new?hide_repo_select=true&ref=public%2Fbuild%2Fdevcontainer&repo=302607352&machine=standardLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json
downstream-*
for more distributions (generate withtox
from the info intox.ini, use
_sagemath` package)develop-conda-forge-src-environment-dev
(https://doc.sagemath.org/html/en/installation/conda.html#using-conda-to-provide-all-dependencies-for-the-sage-library-experimental, similar to our gitpod configuration)portability-debian-buster-i386-standard
and fix itdevelop-docker-cocalc
(was: builds well (after increasing disk image space on the Docker daemon); fails to run)portability-centos-7-devtoolset-gcc_11-standard
(was: builds well; fails to run (exactly the same on WSL))downstream-docker-sagemath
(after #34242)portability-Dockerfile
as explained in comment:299Depends 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