Make docker images from tox/GitHub CI workflow, regular Sage Docker images, gitpod, CoCalc interoperable
mkoeppe opened this issue · 29 comments
-
Adjust directory names to something that works for both cases ...
docker/Dockerfilecurrently has:SAGE_ROOT=/home/sage/sageSAGE_LOCAL=$SAGE_ROOT/local
- Docker images built with tox/GH Actions (including Gitpod) and also
computop/sagehave:SAGE_ROOT=/sageSAGE_LOCAL=/sage/local
- After this ticket:
SAGE_ROOT=/sageSAGE_LOCAL=/opt/sage
- CoCalc Docker image has:
SAGE_ROOT=/usr/local/sageSAGE_LOCAL=/usr/local/sage/local
-
#33851: Define a script package representing "useful stuff to have on a Docker image"
-
Replace all
apt-getindocker/Dockerfileby using a Docker image built usingbuild/bin/write-dockerfileas the base image. -
By default,
docker/Dockerfilewould useconfigure --without-system-...a lot so that CI is done against "the reference distribution" -
Move
build/bin/write-dockerfile.shintodocker/ -
Add a mechanism (environment variable) to
tox -e docker...to copy SAGE_LOCAL from a given Docker image.
CC: @kliem @dimpase @embray @saraedum @slel @fchapoton @tobiasdiez @williamstein @culler @NathanDunfield
Component: docker
Keywords: ci, ContinuousIntegration, sd109
Issue created by migration from https://trac.sagemath.org/ticket/29536
Description changed:
---
+++
@@ -1,3 +1,7 @@
... by adjusting directory names to something that works for both cases ...
+`docker/Dockerfile`:
+- `SAGE_ROOT=/home/sage/sage`
+- `SAGE_LOCAL=$SAGE_ROOT/local`
+by the way, we don't seem to have in docs an explanation regarding file shared between docker images and regular file system of the host system.
Changed keywords from ci, ContinuousIntegration to ci, ContinuousIntegration, sd109
Description changed:
---
+++
@@ -1,7 +1,12 @@
-... by adjusting directory names to something that works for both cases ...
+1. adjust directory names to something that works for both cases ...
-`docker/Dockerfile`:
-- `SAGE_ROOT=/home/sage/sage`
-- `SAGE_LOCAL=$SAGE_ROOT/local`
+ `docker/Dockerfile`:
+ - `SAGE_ROOT=/home/sage/sage`
+ - `SAGE_LOCAL=$SAGE_ROOT/local`
+2. Define a script package representing "useful stuff to have on a Docker image" (more than the `_recommended` package from #29557)
+3. Replace all `apt-get` in `docker/Dockerfile` by using a Docker image built using `build/bin/write-dockerfile` as the base image.
+
+4. By default, `docker/Dockerfile` would use `configure --without-system-...` a lot so that CI is done against "the reference distribution"
+I'm confused--should this say "GitHub" in the title or "GitLab"? I don't know of any GitHub CI docker images.
Replying to @embray:
I'm confused--should this say "GitHub" in the title or "GitLab"? I don't know of any GitHub CI docker images.
please see
https://doc.sagemath.org/html/en/developer/index.html#testing-on-multiple-platforms
we now have a builder of docker images for multiple platforms, configurable, and by default hosted on github.
Description changed:
---
+++
@@ -1,8 +1,8 @@
1. adjust directory names to something that works for both cases ...
- `docker/Dockerfile`:
- - `SAGE_ROOT=/home/sage/sage`
- - `SAGE_LOCAL=$SAGE_ROOT/local`
+ `docker/Dockerfile` currently has:
+ - `SAGE_ROOT=/home/sage/sage`
+ - `SAGE_LOCAL=$SAGE_ROOT/local`
2. Define a script package representing "useful stuff to have on a Docker image" (more than the `_recommended` package from #29557)
Description changed:
---
+++
@@ -10,3 +10,7 @@
4. By default, `docker/Dockerfile` would use `configure --without-system-...` a lot so that CI is done against "the reference distribution"
+
+5. Move `build/bin/write-dockerfile` into `docker/`
+
+Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.
Description changed:
---
+++
@@ -13,4 +13,6 @@
5. Move `build/bin/write-dockerfile` into `docker/`
+6. Add a mechanism (environment variable) to `tox -e docker...` to copy SAGE_LOCAL from a given Docker image.
+Description changed:
---
+++
@@ -16,3 +16,5 @@
6. Add a mechanism (environment variable) to `tox -e docker...` to copy SAGE_LOCAL from a given Docker image.
+
+Gitpod - see #32749Bikeshedding time! Let's pick SAGE_ROOT, SAGE_LOCAL. My proposal is in the ticket description.
(The only important constraint for me is: Don't nest SAGE_LOCAL within SAGE_ROOT - for flexibility such as bind-mounting a new version of the source tree over SAGE_ROOT without hiding SAGE_LOCAL.)
Description changed:
---
+++
@@ -1,20 +1,24 @@
-1. adjust directory names to something that works for both cases ...
-
- `docker/Dockerfile` currently has:
- - `SAGE_ROOT=/home/sage/sage`
- - `SAGE_LOCAL=$SAGE_ROOT/local`
+1. Adjust directory names to something that works for both cases ...
+ - `docker/Dockerfile` currently has:
+ - `SAGE_ROOT=/home/sage/sage`
+ - `SAGE_LOCAL=$SAGE_ROOT/local`
+ - Docker images built with tox/GH Actions (including Gitpod) have:
+ - `SAGE_ROOT=/sage`
+ - `SAGE_LOCAL=/sage/local`
+ - **After this ticket:**
+ - `SAGE_ROOT=/sage`
+ - `SAGE_LOCAL=/opt/sage`
2. Define a script package representing "useful stuff to have on a Docker image" (more than the `_recommended` package from #29557)
+ - perhaps call it `_devtools`?
3. Replace all `apt-get` in `docker/Dockerfile` by using a Docker image built using `build/bin/write-dockerfile` as the base image.
4. By default, `docker/Dockerfile` would use `configure --without-system-...` a lot so that CI is done against "the reference distribution"
-5. Move `build/bin/write-dockerfile` into `docker/`
+5. Move `build/bin/write-dockerfile.sh` into `docker/`
6. Add a mechanism (environment variable) to `tox -e docker...` to copy SAGE_LOCAL from a given Docker image.
-
-Gitpod - see #32749Description changed:
---
+++
@@ -11,6 +11,7 @@
2. Define a script package representing "useful stuff to have on a Docker image" (more than the `_recommended` package from #29557)
- perhaps call it `_devtools`?
+ - include the stuff added in #33740 to `environment-dev.yml`
3. Replace all `apt-get` in `docker/Dockerfile` by using a Docker image built using `build/bin/write-dockerfile` as the base image.
Description changed:
---
+++
@@ -12,6 +12,7 @@
2. Define a script package representing "useful stuff to have on a Docker image" (more than the `_recommended` package from #29557)
- perhaps call it `_devtools`?
- include the stuff added in #33740 to `environment-dev.yml`
+ - solve #27677, #29153
3. Replace all `apt-get` in `docker/Dockerfile` by using a Docker image built using `build/bin/write-dockerfile` as the base image.
Description changed:
---
+++
@@ -11,7 +11,7 @@
2. Define a script package representing "useful stuff to have on a Docker image" (more than the `_recommended` package from #29557)
- perhaps call it `_devtools`?
- - include the stuff added in #33740 to `environment-dev.yml`
+ - include the stuff added in #33740 to `environment-dev.yml` and #33671
- solve #27677, #29153
3. Replace all `apt-get` in `docker/Dockerfile` by using a Docker image built using `build/bin/write-dockerfile` as the base image.Description changed:
---
+++
@@ -10,7 +10,7 @@
- `SAGE_LOCAL=/opt/sage`
2. Define a script package representing "useful stuff to have on a Docker image" (more than the `_recommended` package from #29557)
- - perhaps call it `_devtools`?
+ - perhaps call it `_develop`?
- include the stuff added in #33740 to `environment-dev.yml` and #33671
- solve #27677, #29153
Description changed:
---
+++
@@ -9,10 +9,7 @@
- `SAGE_ROOT=/sage`
- `SAGE_LOCAL=/opt/sage`
-2. Define a script package representing "useful stuff to have on a Docker image" (more than the `_recommended` package from #29557)
- - perhaps call it `_develop`?
- - include the stuff added in #33740 to `environment-dev.yml` and #33671
- - solve #27677, #29153
+2. #33851: Define a script package representing "useful stuff to have on a Docker image"
3. Replace all `apt-get` in `docker/Dockerfile` by using a Docker image built using `build/bin/write-dockerfile` as the base image.
Commit: 58e112a
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
10338a7 | Change ci as well |
0cf7334 | Add sage-setup as install-requires dep |
6d2b149 | Use relative paths to not install src package |
1dba3ba | Maybe thats the correct shebang? |
c1b2fbf | Revert install_requires change |
ad56ba3 | Go back to two pip installs for now |
b42f5f5 | Readd how to use specific python version |
87f360c | Readd name arg |
01eb374 | Merge #33740 |
58e112a | bootstrap-conda: Use script package _develop instead of hardcoded list of dev tools; remove unused RECOMMENDED |
Changed branch from u/mkoeppe/make_docker_images_from_tox_github_ci_workflow__regular_sage_docker_images__and_gitpod_interoperable to none
Description changed:
---
+++
@@ -8,6 +8,9 @@
- **After this ticket:**
- `SAGE_ROOT=/sage`
- `SAGE_LOCAL=/opt/sage`
+ - CoCalc Docker image has:
+ - `SAGE_ROOT=/usr/local/sage`
+ - `SAGE_LOCAL=/usr/local/sage/local`
2. #33851: Define a script package representing "useful stuff to have on a Docker image"
Description changed:
---
+++
@@ -2,7 +2,7 @@
- `docker/Dockerfile` currently has:
- `SAGE_ROOT=/home/sage/sage`
- `SAGE_LOCAL=$SAGE_ROOT/local`
- - Docker images built with tox/GH Actions (including Gitpod) have:
+ - Docker images built with tox/GH Actions (including Gitpod) and also `computop/sage` have:
- `SAGE_ROOT=/sage`
- `SAGE_LOCAL=/sage/local`
- **After this ticket:**