-
-
Notifications
You must be signed in to change notification settings - Fork 18
Automated build #13
Comments
We can work around the resource limit by using linked repositories. It's the officially proposed workaround. I am trying to setup a prototype. |
This is more limited than I thought. It appears that you can only do this when you only care about a tag such as |
It's a bit counter to the way a |
So dockerhub runs a quite old version of docker, so I run into errors. It seems that they are not really developing dockerhub anymore. And docker cloud has no free autobuilds for open source projects anymore. |
Ok, I now have a working version (using CircleCI for the build) which pushes the images and the READMEs automatically at https://github.com/saraedum/sage/tree/circleci which builds to https://hub.docker.com/r/saraedum/sagemath/ and https://hub.docker.com/r/saraedum/sagemath-dev/. |
No, but I could try to be. But I am leaving in ~10 minutes. Give me chance to look over what you've been doing. It sounds impressive! |
I see you've completely reworked the Dockerfile using multi-stage builds. That feature didn't exist when I first started working on it, but it looks like it will make things simpler than my Makefile. I'm still not 100% sure how I feel about some of the fine details but I'm going to take a closer look tomorrow. |
I haven't used Circle-CI yet personally, though I've seen a few other projects that do. What do they offer that makes it such that there's enough time to actually perform the builds? |
|
The current Dockerfile runs in less than one hour actually. The limiting factor of docker hub was that I ran out of space (inodes?) and that their version of docker is quite old (surprisingly.) |
About multi-stage builds: yes, it's somewhat new and makes the builder pattern mostly unnecessary. I like the idea of having everything in one Dockerfile that actually works, so people can just type |
I am also not sure whether I forgot to copy something over. My dev image is |
From 8.1 to 8.2.beta3 things have changed in the build system it seems, so CircleCI is now essentially rebuilding all of Sage's dependencies. It won't manage to do that on one core in 120 minutes. :( |
I'll try to transfer the circleCI build to gitlab and see if that's more convenient. They give us two cores, 50GB of disk, 2GB of RAM, and a recent docker. |
The CircleCI build actually finished after about 4 hours. Apparently they increased their time limit to five hours: https://discuss.circleci.com/t/maximum-build-time-for-builds/18383 |
So the CircleCI build works after all. Anyway, I started working on a Gitlab CI version here: https://gitlab.com/saraedum/sage/tree/gitlabci (click the round icon next to the commit hash to see the build process.) |
Just to be clear, there's nothing different in the Dockerbuild itself between your gitlab and circleci builds right? It's just the configuration of the CI service itself? (I actually didn't realize Gitlab was offering a CI service now) |
I'm also making good progress on improving Sage's ability to use system packages for many of its dependencies, so that should also squash build time where possible. Obviously this can still get tricky. We want to make sure we choose versions of packages that work well with Sage (and that, in turn, could impact what distro(s) we use as the base image). |
@embray: Yes, there should be no difference between CircleCI and GitLab CI, they run the same docker commands to build the images. |
The runners for GitLab CI seems to be a bit underpowered:
Probably we want to use paid (but cheap) runners here…or stick with Circle CI but Circle CI also barely finished in time. Or just increase the build time limit to a couple of days… |
I created a ticket at https://trac.sagemath.org/ticket/24655#ticket for this as I would like to include the Dockerfile and recipes into the main repository. |
Btw., I added a README that you can see here https://hub.docker.com/r/saraedum/sagemath/. |
|
It would be nice to have dockerhub build automatically our images. This would save us from having to maintain the infrastructure to do those builds on a regular basis. As a nice side effect, the docker image description on dockerhub would be automatically filled from the README (see #5)
The show stopper may bethat there are resource limits that dockerhub impose on the build process. See:
http://stackoverflow.com/questions/34440753/docker-hub-timeout-in-automated-build. We may not fit in them.
The text was updated successfully, but these errors were encountered: