-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[CI] Reduce the number of times Docker images are built #6301
Comments
Example: the Jenkins CI server of the TVM project (https://github.com/apache/incubator-tvm) pulls pre-built images from the Docker hub. There exists a time gap between the modification of |
This comment has been minimized.
This comment has been minimized.
My diagnosis was wrong. The actual reason is that Docker containers with different CUDA versions (10.2, 11.0) get pushed to the same Docker registry ( Fix. Create separate registries to cache containers with different CUDA versions, e.g. |
Currently, the CI server heavily uses Docker containers to manage suitable testing environments for the Linux platform. The original intent was to avoid the need for installing packages over and over again, by caching Docker images that were previously built. So the cost of building Docker containers would be amortized over multiple test jobs.
Unfortunately, in recent weeks, the Docker containers are being re-built from scratch very frequently.
The reason is that, whenever the base container (Edit. This is not the correct diagnosis. See the latest comment below.nvidia/cuda
) gets updated, all the cached Docker layers get invalidated, forcing our CI server to re-build the container from scratch.I recognize the importance of that security patches, but having to re-build entire Docker containers from scratch is tremendously wasteful. (It takes 20-30 mins to complete the build.)
Proposed fix.
We should have a cron job (or something equivalent) that builds new Docker containers from the Dockerfiles at a preset frequency (say, every 2 weeks). All CI jobs should now always pull pre-build containers, instead of attempting to build containers from Dockerfile. In short, our containers should be updated less frequently than the baseEdit. See the latest comment below.cuda
container is updated. The disadvantage is that updating Dockerfile won't cause rebuilding of the container immediately.@trivialfis
The text was updated successfully, but these errors were encountered: