-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
d8fbfa1
to
e6e3d0b
Compare
2f1df34
to
6baaada
Compare
Image build time decreased from 42m to 3m |
What Docker image repository are we using? |
@alexbaden I use Docker Hub (= docker.io); it should give us 200 pulls for 6 hours for free |
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.
👍 Great PR.
Currently it uses https://hub.docker.com/u/dataved as public image and pushed new image on combined Dockerfile hash changed. As a result dockerhub is our public cache.
Docker pull step takes about ~3 minutes, that is better than docker build even using cached layers.
Please, provide description to this pr, because there are a lot of fundamental changes in Docker build workflow (files moved from omnisci folder and now used public image).
Also currently Docker image update happens automatically (can happen on each pr) I would prefer a separate job to handle changes to the image, but this is not critical, we will test this suggested approach and update later.
There are also some minor motes, that can be done in further prs.
|
||
- name: Configure and build the project | ||
run: | | ||
docker exec -u ghrunner build.${{ inputs.name }} dpkg -l | ||
docker exec -u ghrunner build.${{ inputs.name }} sh /_work/omniscidb/scripts/conda/build.sh ${{ inputs.options }} |
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 think maven cache also can used from cache.
docker cp ~/.m2/. verify:/home/ghrunner/.m2
or with -v ${PWD}/.m2:/home/ghrunner/.m2
.
rm -rf /tmp/.buildx-cache | ||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | ||
push: true | ||
tags: ${{ env.DOCKER_NAME }} |
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.
Minor note. It's possible to reduce amount of pulls from docker.io with caching docker local storage with github cache. As it reduces build time ~ 2 mins we decided to keep current (more simple and direct) approach. Also github cache is limited with 10 GB and current image size is ~5.6 Gb, conda env/ maven should also be cached so caching for docker storage will be checked later.
@@ -11,6 +11,9 @@ on: | |||
options: | |||
type: string | |||
default: -DENABLE_CUDA=off | |||
secrets: | |||
DOCKERHUB_PASSWORD: |
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 thought that secrets are global vars for all github jobs, but after discussion with Alexei I understood that it's special github behavior https://github.blog/changelog/2022-05-03-github-actions-simplify-using-secrets-with-reusable-workflows/ . Maybe there are some WA, because secrets added as https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-an-environment .
This is only to mark and summarize our discussion.
Subj