-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
New GitHub workflow to continue our images on Docker Hub #36047
Conversation
|
||
################################################################################ | ||
# Image containing the run-time dependencies for Sage # | ||
################################################################################ | ||
FROM ubuntu:jammy as run-time-dependencies | ||
FROM ubuntu:latest as run-time-dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not use latest
here. In the past things usually broke when ubuntu upgraded their "latest" tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I will change that in the next commit!
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need QEMU here and below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need QEMU here and below?
It's there from the master I used. I will drop it in the next commit.
I am happy with these changes if they make the docker build work again. (I had some minor comments, but nothing of much substance.) |
Co-authored-by: Julian Rüth <julian.rueth@fsfe.org>
Thanks for the review! Can you please elaborate on my (implicit) question from the paragraph starting with
More precisely, will it be o.K. to change the meaning of the |
Documentation preview for this PR (built with commit b0d14d2; changes) is ready! 🎉 |
Let's merge it so it can run automatically on the release. |
Thank you very much! I agree: the sooner it's up and running, the better. I will open a follow-up PR in September to cover @saraedum 's suggestions. Do we already have Docker Hub secrets in the upstream repository? |
I have to admit I don't really understand your questions. The meaning of the repositories and tags is explained in the README at https://hub.docker.com/r/sagemath/sagemath-dev/. Does that answer the question about So, what's in Does |
Yes, I've seen that.
No! My point about the tags relates to your answer below. Since they're still in use, I've simply avoided setting them before realizing how much current behavior will change.
In principle it works, but unfortunately a large part of Sage had to be rebuilt. Is this what the earlier My suggestion: After my vacation (around mid-September) I manually replace the tag |
…r Hub <!-- ^^^^^ 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 --> This PR implements a GitHub workflow which sould establish a continuation of the Docker images in the Sage Docker Hub repositories. Therefore, it aims to replace `$SAGE_ROOT/.gitlab-ci.yml` which has been used formerly for this purpose but isn't working any more (see [sage- devel-thread fom April 5th](https://groups.google.com/g/sage- devel/c/eJ_OicQXM8Y)). The new worklfow uses the same `$SAGE_ROOT/docker/Dockerfile` as `SAGE_ROOT/.gitlab-ci.yml` and is based on [docker/build-push- action@v4](https://github.com/docker/build-push-action). Concerning the images placed in the [sagemath-dev repository](https://hub.docker.com/r/sagemath/sagemath-dev) you should note the following difference to the releases built before 9.8: They are no longer build on target `sagemath-dev` since this causes a "No space left on device" error (see the [log- file](https://github.com/soehms/sage/actions/runs/5694284990) of a correspondig test run). Instead they are build on target `make-build`, now. I think the main difference is the missing build of documentation. But, I don't know if this fits with the idea of this repository. If we really need target `sagemath-dev` then maybe something like the `free disk space` step of job `linux` in `.github/workflows/docker.yml` would help to get it run through. What about to just pull `ghcr.io/sagemath/sage/sage-ubuntu-jammy-standard-with-targets` and push it to `sagemath-dev` on Docker Hub. Please post here what you think would be the preferred way. Until this is not clearified I ommit setting the tags `develop` and `latest` in `sagemath-dev` (note that these tags still have ongoing pulls). The workflow does not use [docker/metadata- action@v4](https://github.com/docker/metadata-action#latest-tag) as we need to distinguish between `latest` and `develop` tags in the Docker Hub repositories. Furthermore, if the workflow is triggered manually, this should result in the same tags as when triggered by pushing a new release tag (`metadata` would take the branch name). The reason why the worklflow is split into two jobs is because the time limit of 6 hours per job was exeeded in a former test with just one job. I've tested the new workflow in my fork repository using the `workflow_dispatch` (see the corresponding [log- file](https://github.com/soehms/sage/actions/runs/5795823327)). The resulting tags on Docker Hub are: * [sagemath/sagemath:10.1.beta9](https://hub.docker.com/layers/sagemath/ sagemath/10.1.beta9/images/sha256- 4c00148d6e6c2134728b0a74d0e778281d64a8f0ff9b49ade0b9af68de758f12?context =repo) * [sagemath/sagemath:develop](https://hub.docker.com/layers/sagemath/sag emath/develop/images/sha256- 4c00148d6e6c2134728b0a74d0e778281d64a8f0ff9b49ade0b9af68de758f12?context =repo) * [sagemath/sagemath- dev:10.1.beta9](https://hub.docker.com/layers/sagemath/sagemath-dev/10.1 .beta9/images/sha256- d5071d0cb683edf9f22d19c2c26d5d580dc4e05823c755bfce85c744b557fd14?context =repo) In order that this worked I had to set the secrets `secrets.DOCKERHUB_USERNAME` and `secrets.DOCKERHUB_TOKEN` in my fork of the GitHub repository. Thus, after this PR is merged a maintainer has to set this secrets on the upstream repository. <!-- 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. --> ### 📝 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. - [x] 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: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36047 Reported by: Sebastian Oehms Reviewer(s): Julian Rüth, Sebastian Oehms
This is done, now. I've triggered the docker images for It seems that we still don't have the DockerHub secrets in the GitHub
Since I can't set the secrets, can please one of you, @saraedum @mkoeppe, do that? |
I added some secrets. Can you try if that works? |
Thanks a lot! Unfortunately I can't even trigger the workflow manually in the If the But, if you have trouble, we can just wait until the next beta release ( |
Thanks again! The login is working now (see the logfile of the last beta release). The reason that the workflow did fail again was a problem with building |
Now, with |
<!-- ^^^^^ 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 --> <!-- 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. --> This is a follow up PR of sagemath#36047. It does the following: 1. It fixes a wrong sort order for the tags that would cause a wrong tag for stable releases 2. It enables the push of the `sagemath-dev:develop` and `sagemath- dev:latest` tags according to my suggestion in sagemath#36047 (comment) 3. It implements improvements suggested by @saraedum in sagemath#36047. 4. It contains the upgrades from the auto-generated *dependabot- branches* for the Docker Hub GitHub App (`dependabot/github_actions/docker/...`). Thus, as soon as this PR is merged, these auto-generated branches can be deleted by a maintainer. Still open is this suggestion from sagemath#36047 (comment): > Could we delete the gitlab setup in this PR as well? It's not working anymore anyway @saraedum What should be deleted explicitly? `.gitlab-ci.yml` and the scripts used by it excludingly (`.ci/protect-secrets.sh`, `.ci/describe- system.sh`)? Other sources? ### 📝 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. - [x] 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: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36385 Reported by: Sebastian Oehms Reviewer(s): Matthias Köppe, Sebastian Oehms
<!-- ^^^^^ 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 --> <!-- 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. --> This is a follow up PR of sagemath#36047. It does the following: 1. It fixes a wrong sort order for the tags that would cause a wrong tag for stable releases 2. It enables the push of the `sagemath-dev:develop` and `sagemath- dev:latest` tags according to my suggestion in sagemath#36047 (comment) 3. It implements improvements suggested by @saraedum in sagemath#36047. 4. It contains the upgrades from the auto-generated *dependabot- branches* for the Docker Hub GitHub App (`dependabot/github_actions/docker/...`). Thus, as soon as this PR is merged, these auto-generated branches can be deleted by a maintainer. Still open is this suggestion from sagemath#36047 (comment): > Could we delete the gitlab setup in this PR as well? It's not working anymore anyway @saraedum What should be deleted explicitly? `.gitlab-ci.yml` and the scripts used by it excludingly (`.ci/protect-secrets.sh`, `.ci/describe- system.sh`)? Other sources? ### 📝 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. - [x] 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: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36385 Reported by: Sebastian Oehms Reviewer(s): Matthias Köppe, Sebastian Oehms
<!-- ^^^^^ 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 --> <!-- 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. --> This is a follow up PR of sagemath#36047. It does the following: 1. It fixes a wrong sort order for the tags that would cause a wrong tag for stable releases 2. It enables the push of the `sagemath-dev:develop` and `sagemath- dev:latest` tags according to my suggestion in sagemath#36047 (comment) 3. It implements improvements suggested by @saraedum in sagemath#36047. 4. It contains the upgrades from the auto-generated *dependabot- branches* for the Docker Hub GitHub App (`dependabot/github_actions/docker/...`). Thus, as soon as this PR is merged, these auto-generated branches can be deleted by a maintainer. Still open is this suggestion from sagemath#36047 (comment): > Could we delete the gitlab setup in this PR as well? It's not working anymore anyway @saraedum What should be deleted explicitly? `.gitlab-ci.yml` and the scripts used by it excludingly (`.ci/protect-secrets.sh`, `.ci/describe- system.sh`)? Other sources? ### 📝 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. - [x] 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: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36385 Reported by: Sebastian Oehms Reviewer(s): Matthias Köppe, Sebastian Oehms
This PR implements a GitHub workflow which sould establish a continuation of the Docker images in the Sage Docker Hub repositories. Therefore, it aims to replace
$SAGE_ROOT/.gitlab-ci.yml
which has been used formerly for this purpose but isn't working any more (see sage-devel-thread fom April 5th).The new worklfow uses the same
$SAGE_ROOT/docker/Dockerfile
asSAGE_ROOT/.gitlab-ci.yml
and is based on docker/build-push-action@v4.Concerning the images placed in the sagemath-dev repository you should note the following difference to the releases built before 9.8: They are no longer build on target
sagemath-dev
since this causes a "No space left on device" error (see the log-file of a correspondig test run). Instead they are build on targetmake-build
, now. I think the main difference is the missing build of documentation.But, I don't know if this fits with the idea of this repository. If we really need target
sagemath-dev
then maybe something like thefree disk space
step of joblinux
in.github/workflows/docker.yml
would help to get it run through. What about to just pullghcr.io/sagemath/sage/sage-ubuntu-jammy-standard-with-targets
and push it tosagemath-dev
on Docker Hub. Please post here what you think would be the preferred way. Until this is not clearified I ommit setting the tagsdevelop
andlatest
insagemath-dev
(note that these tags still have ongoing pulls).The workflow does not use docker/metadata-action@v4 as we need to distinguish between
latest
anddevelop
tags in the Docker Hub repositories. Furthermore, if the workflow is triggered manually, this should result in the same tags as when triggered by pushing a new release tag (metadata
would take the branch name).The reason why the worklflow is split into two jobs is because the time limit of 6 hours per job was exeeded in a former test with just one job.
I've tested the new workflow in my fork repository using the
workflow_dispatch
(see the corresponding log-file). The resulting tags on Docker Hub are:In order that this worked I had to set the secrets
secrets.DOCKERHUB_USERNAME
andsecrets.DOCKERHUB_TOKEN
in my fork of the GitHub repository. Thus, after this PR is merged a maintainer has to set this secrets on the upstream repository.📝 Checklist
⌛ Dependencies