From c4b533f0e1d05f7134655a8d7afdaf9b67968bb4 Mon Sep 17 00:00:00 2001 From: Shaojun Liu <61072813+liu-shaojun@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:12:28 +0800 Subject: [PATCH] nightly build docker images (#10585) * nightly build docker images --- .github/workflows/manually_build.yml | 63 +++++++++++++++++++++------- .github/workflows/nightly_build.yml | 6 +++ 2 files changed, 54 insertions(+), 15 deletions(-) diff --git a/.github/workflows/manually_build.yml b/.github/workflows/manually_build.yml index 22014b7a..36525496 100644 --- a/.github/workflows/manually_build.yml +++ b/.github/workflows/manually_build.yml @@ -22,16 +22,28 @@ on: required: true default: 'latest' type: string + workflow_call: + inputs: + artifact: + description: 'select which job to run("all" will make all jobs run)' + required: true + default: 'all' + type: string + tag: + description: 'docker image tag (e.g. 2.1.0-SNAPSHOT)' + required: true + default: 'latest' + type: string env: - TAG: ${{ github.event.inputs.tag }} + TAG: ${{ inputs.tag }} permissions: contents: read jobs: ipex-llm-finetune-lora-cpu: - if: ${{ github.event.inputs.artifact == 'ipex-llm-finetune-lora-cpu' || github.event.inputs.artifact == 'all' }} + if: ${{ inputs.artifact == 'ipex-llm-finetune-lora-cpu' || inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -55,10 +67,13 @@ jobs: sudo docker push ${image}:${TAG} sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} sudo docker push 10.239.45.10/arda/${image}:${TAG} - sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + # tag 'latest' + sudo docker tag ${image}:${TAG} ${image}:latest + sudo docker push ${image}:latest + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} ${image}:latest ipex-llm-finetune-qlora-cpu: - if: ${{ github.event.inputs.artifact == 'ipex-llm-finetune-qlora-cpu' || github.event.inputs.artifact == 'all' }} + if: ${{ inputs.artifact == 'ipex-llm-finetune-qlora-cpu' || inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -82,10 +97,13 @@ jobs: sudo docker push ${image}:${TAG} sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} sudo docker push 10.239.45.10/arda/${image}:${TAG} - sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + # tag 'latest' + sudo docker tag ${image}:${TAG} ${image}:latest + sudo docker push ${image}:latest + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} ${image}:latest ipex-llm-finetune-qlora-xpu: - if: ${{ github.event.inputs.artifact == 'ipex-llm-finetune-qlora-xpu' || github.event.inputs.artifact == 'all' }} + if: ${{ inputs.artifact == 'ipex-llm-finetune-qlora-xpu' || inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -109,10 +127,13 @@ jobs: sudo docker push ${image}:${TAG} sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} sudo docker push 10.239.45.10/arda/${image}:${TAG} - sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + # tag 'latest' + sudo docker tag ${image}:${TAG} ${image}:latest + sudo docker push ${image}:latest + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} ${image}:latest ipex-llm-xpu: - if: ${{ github.event.inputs.artifact == 'ipex-llm-xpu' || github.event.inputs.artifact == 'all' }} + if: ${{ inputs.artifact == 'ipex-llm-xpu' || inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -136,10 +157,13 @@ jobs: sudo docker push ${image}:${TAG} sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} sudo docker push 10.239.45.10/arda/${image}:${TAG} - sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + # tag 'latest' + sudo docker tag ${image}:${TAG} ${image}:latest + sudo docker push ${image}:latest + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} ${image}:latest ipex-llm-cpu: - if: ${{ github.event.inputs.artifact == 'ipex-llm-cpu' || github.event.inputs.artifact == 'all' }} + if: ${{ inputs.artifact == 'ipex-llm-cpu' || inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -163,10 +187,13 @@ jobs: sudo docker push ${image}:${TAG} sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} sudo docker push 10.239.45.10/arda/${image}:${TAG} - sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + # tag 'latest' + sudo docker tag ${image}:${TAG} ${image}:latest + sudo docker push ${image}:latest + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} ${image}:latest ipex-llm-serving-xpu: - if: ${{ github.event.inputs.artifact == 'ipex-llm-serving-xpu' || github.event.inputs.artifact == 'all' }} + if: ${{ inputs.artifact == 'ipex-llm-serving-xpu' || inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: @@ -190,10 +217,13 @@ jobs: sudo docker push ${image}:${TAG} sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} sudo docker push 10.239.45.10/arda/${image}:${TAG} - sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + # tag 'latest' + sudo docker tag ${image}:${TAG} ${image}:latest + sudo docker push ${image}:latest + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} ${image}:latest ipex-llm-serving-cpu: - if: ${{ github.event.inputs.artifact == 'ipex-llm-serving-cpu' || github.event.inputs.artifact == 'all' }} + if: ${{ inputs.artifact == 'ipex-llm-serving-cpu' || inputs.artifact == 'all' }} runs-on: [self-hosted, Shire] steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3 @@ -216,5 +246,8 @@ jobs: sudo docker push ${image}:${TAG} sudo docker tag ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} sudo docker push 10.239.45.10/arda/${image}:${TAG} - sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} + # tag 'latest' + sudo docker tag ${image}:${TAG} ${image}:latest + sudo docker push ${image}:latest + sudo docker rmi -f ${image}:${TAG} 10.239.45.10/arda/${image}:${TAG} ${image}:latest diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index f4336247..a6223031 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -69,6 +69,12 @@ jobs: job-name: python-build runner-hosted-on: 'Shanghai' + docker-build: + if: ${{ github.event.schedule }} + uses: ./.github/workflows/manually_build.yml + with: + artifact: all + tag: 2.1.0-SNAPSHOT create-workflow-badge: runs-on: ubuntu-latest