Skip to content

Commit 0f8eb0f

Browse files
authored
[GLUTEN-10926][VL] Refine docker image build (#11126)
This patch refines the docker image build by split the merge job speedup the downloading for celeborn/uniffle/hadoop with faster apache mirror --------- Signed-off-by: Yuan <[email protected]>
1 parent b052aec commit 0f8eb0f

File tree

3 files changed

+54
-11
lines changed

3 files changed

+54
-11
lines changed

.github/workflows/docker_image.yml

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,11 @@ jobs:
385385
runs-on: ubuntu-latest
386386
strategy:
387387
matrix:
388-
digests: [ vcpkg-centos-8, vcpkg-centos-9, centos-8-jdk8, centos-8-jdk11, centos-8-jdk17, centos-9-jdk8, centos-9-jdk11, centos-9-jdk17 ]
388+
digests: [ vcpkg-centos-8, vcpkg-centos-9 ]
389389
needs:
390390
- build-vcpkg-centos-8
391391
- build-vcpkg-centos-9
392-
- build-centos-8
393-
- build-centos-9
392+
394393
steps:
395394
- name: Download digests
396395
uses: actions/download-artifact@v4
@@ -466,3 +465,47 @@ jobs:
466465
- name: Inspect image
467466
run: |
468467
docker buildx imagetools inspect ${{ env.DOCKERHUB_REPO }}:${{ steps.meta.outputs.version }}
468+
469+
merge-dynamic:
470+
if: ${{ startsWith(github.repository, 'apache/') }}
471+
runs-on: ubuntu-latest
472+
strategy:
473+
matrix:
474+
digests: [ centos-8-jdk8, centos-8-jdk11, centos-8-jdk17, centos-9-jdk8, centos-9-jdk11, centos-9-jdk17 ]
475+
needs:
476+
- build-centos-8
477+
- build-centos-9
478+
steps:
479+
- name: Download digests
480+
uses: actions/download-artifact@v4
481+
with:
482+
path: ${{ runner.temp }}/digests
483+
pattern: digests-${{ matrix.digests }}-*
484+
merge-multiple: true
485+
486+
- name: Login to Docker Hub
487+
uses: docker/login-action@v2
488+
with:
489+
username: ${{ secrets.DOCKERHUB_USER }}
490+
password: ${{ secrets.DOCKERHUB_TOKEN }}
491+
492+
- name: Set up Docker Buildx
493+
uses: docker/setup-buildx-action@v3
494+
495+
- name: Docker meta
496+
id: meta
497+
uses: docker/metadata-action@v5
498+
with:
499+
images: ${{ env.DOCKERHUB_REPO }}
500+
tags: ${{ matrix.digests }}
501+
502+
- name: Create manifest list and push
503+
working-directory: ${{ runner.temp }}/digests
504+
run: |
505+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
506+
$(printf '${{ env.DOCKERHUB_REPO }}@sha256:%s ' *)
507+
508+
- name: Inspect image
509+
run: |
510+
docker buildx imagetools inspect ${{ env.DOCKERHUB_REPO }}:${{ steps.meta.outputs.version }}
511+

dev/docker/Dockerfile.centos8-dynamic-build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ RUN set -ex; \
4040
tar -xvf ${local_binary}; \
4141
mv apache-maven-${maven_version} /usr/lib/maven; \
4242
rm -rf ${local_binary}; \
43-
wget -nv https://archive.apache.org/dist/celeborn/celeborn-0.5.4/apache-celeborn-0.5.4-bin.tgz -P /opt/; \
44-
wget -nv https://archive.apache.org/dist/celeborn/celeborn-0.6.1/apache-celeborn-0.6.1-bin.tgz -P /opt/; \
45-
wget -nv https://archive.apache.org/dist/incubator/uniffle/0.9.2/apache-uniffle-0.9.2-incubating-bin.tar.gz -P /opt/; \
46-
wget -nv https://archive.apache.org/dist/hadoop/common/hadoop-2.8.5/hadoop-2.8.5.tar.gz -P /opt/; \
43+
wget -nv ${mirror_host}/celeborn/celeborn-0.5.4/apache-celeborn-0.5.4-bin.tgz?action=download -P /opt/; \
44+
wget -nv ${mirror_host}/celeborn/celeborn-0.6.1/apache-celeborn-0.6.1-bin.tgz?action=download -P /opt/; \
45+
wget -nv ${mirror_host}/uniffle/0.9.2/apache-uniffle-0.9.2-incubating-bin.tar.gz?action=download -P /opt/; \
46+
wget -nv ${mirror_host}/hadoop/common/hadoop-2.8.5/hadoop-2.8.5.tar.gz -P /opt/; \
4747
git clone --depth=1 https://github.com/apache/incubator-gluten /opt/gluten; \
4848
cd /opt/gluten/.github/workflows/util/; \
4949
./install-spark-resources.sh 3.2; \

dev/docker/Dockerfile.centos9-dynamic-build

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ RUN set -ex; \
3838
tar -xvf ${local_binary}; \
3939
mv apache-maven-${maven_version} /usr/lib/maven; \
4040
rm -rf ${local_binary}; \
41-
wget -nv https://archive.apache.org/dist/celeborn/celeborn-0.5.4/apache-celeborn-0.5.4-bin.tgz -P /opt/; \
42-
wget -nv https://archive.apache.org/dist/celeborn/celeborn-0.6.1/apache-celeborn-0.6.1-bin.tgz -P /opt/; \
43-
wget -nv https://archive.apache.org/dist/incubator/uniffle/0.9.2/apache-uniffle-0.9.2-incubating-bin.tar.gz -P /opt/; \
44-
wget -nv https://archive.apache.org/dist/hadoop/common/hadoop-2.8.5/hadoop-2.8.5.tar.gz -P /opt/; \
41+
wget -nv ${mirror_host}/celeborn/celeborn-0.5.4/apache-celeborn-0.5.4-bin.tgz?action=download -P /opt/; \
42+
wget -nv ${mirror_host}/celeborn/celeborn-0.6.1/apache-celeborn-0.6.1-bin.tgz?action=download -P /opt/; \
43+
wget -nv ${mirror_host}/uniffle/0.9.2/apache-uniffle-0.9.2-incubating-bin.tar.gz?action=download -P /opt/; \
44+
wget -nv ${mirror_host}/hadoop/common/hadoop-2.8.5/hadoop-2.8.5.tar.gz -P /opt/; \
4545
git clone --depth=1 https://github.com/apache/incubator-gluten /opt/gluten; \
4646
cd /opt/gluten/.github/workflows/util/; \
4747
./install-spark-resources.sh 3.2; \

0 commit comments

Comments
 (0)