From d9f704a1b3e222c920d88c703d45ecdbcdb1ac4f Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Sat, 8 Jun 2024 07:53:21 +0200 Subject: [PATCH] Are we done ? --- .github/workflows/build.yaml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1fbb47aea..3437dc4ac 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,6 +22,7 @@ jobs: concurrency: group: ${{ github.workflow }}-build-and-push-image-${{ inputs.hardware }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true + # TODO see with @Glegendre to get CPU runner here instead runs-on: [self-hosted, nvidia-gpu , multi-gpu, 4-a10, ci] permissions: contents: write @@ -124,21 +125,21 @@ jobs: type=semver,pattern={{major}}.{{minor}}${{ env.LABEL }} type=raw,value=latest${{ env.LABEL }},enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }} - # - name: Build and push Docker image - # id: build-and-push - # uses: docker/build-push-action@v4 - # with: - # context: . - # file: ${{ env.DOCKERFILE }} - # push: true - # platforms: 'linux/amd64' - # build-args: | - # GIT_SHA=${{ env.GITHUB_SHA }} - # DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }} - # tags: ${{ steps.meta.outputs.tags || steps.meta-pr.outputs.tags }} - # labels: ${{ steps.meta.outputs.labels || steps.meta-pr.outputs.labels }} - # cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/community/text-generation-inference:cache${{ env.LABEL }},mode=min - # cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/community/text-generation-inference:cache${{ env.LABEL }},mode=min + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@v4 + with: + context: . + file: ${{ env.DOCKERFILE }} + push: true + platforms: 'linux/amd64' + build-args: | + GIT_SHA=${{ env.GITHUB_SHA }} + DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }} + tags: ${{ steps.meta.outputs.tags || steps.meta-pr.outputs.tags }} + labels: ${{ steps.meta.outputs.labels || steps.meta-pr.outputs.labels }} + cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/community/text-generation-inference:cache${{ env.LABEL }},mode=min + cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/community/text-generation-inference:cache${{ env.LABEL }},mode=min - name: Final id: final run: | @@ -151,7 +152,7 @@ jobs: group: ${{ github.workflow }}-${{ github.job }}-${{ needs.build-and-push.outputs.label }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true needs: build-and-push - runs-on: ["self-hosted", "${{ needs.build-and-push.outputs.runs_on }}", "multi-gpu", "ci"] + runs-on: ["self-hosted", "${{ needs.build-and-push.outputs.runs_on }}", "multi-gpu"] if: needs.build-and-push.outputs.runs_on != 'ubuntu-latest' steps: - name: Checkout repository