From b31477cf63e330e995058e8371e859ef3e57b0b4 Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Thu, 12 Dec 2024 15:38:44 +0100 Subject: [PATCH] misc(ci): lets actually use sccache ... --- .github/workflows/build_trtllm.yaml | 4 ++++ Dockerfile_trtllm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_trtllm.yaml b/.github/workflows/build_trtllm.yaml index 3fe11401b99..c982fc7d94d 100644 --- a/.github/workflows/build_trtllm.yaml +++ b/.github/workflows/build_trtllm.yaml @@ -46,6 +46,8 @@ jobs: - name: Build and push Docker image id: build-and-push + env: + LABEL: "trtllm" uses: docker/build-push-action@v4 with: context: . @@ -63,6 +65,8 @@ jobs: AWS_ACCESS_KEY_ID=${{ steps.aws-creds.outputs.aws-access-key-id }} AWS_SECRET_ACCESS_KEY=${{ steps.aws-creds.outputs.aws-secret-access-key }} SCCACHE_BUCKET=${{ secrets.AWS_S3_BUCKET_GITHUB_TGI_TEST }} + cache-from: type=s3,region=us-east-1,bucket=ci-docker-buildx-cache,name=text-generation-inference-trtllm-cache${{ env.LABEL }},mode=min,access_key_id=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_ACCESS_KEY_ID }},secret_access_key=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_SECRET_ACCESS_KEY }},mode=min + cache-to: type=s3,region=us-east-1,bucket=ci-docker-buildx-cache,name=text-generation-inference-trtllm-cache${{ env.LABEL }},mode=min,access_key_id=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_ACCESS_KEY_ID }},secret_access_key=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_SECRET_ACCESS_KEY }},mode=min diff --git a/Dockerfile_trtllm b/Dockerfile_trtllm index e448bbee998..2b017850441 100644 --- a/Dockerfile_trtllm +++ b/Dockerfile_trtllm @@ -84,7 +84,7 @@ RUN --mount=type=secret,id=AWS_ACCESS_KEY_ID,env=AWS_ACCESS_KEY_ID \ --mount=type=secret,id=AWS_SECRET_ACCESS_KEY,env=AWS_SECRET_ACCESS_KEY \ --mount=type=secret,id=SCCACHE_BUCKET,env=SCCACHE_BUCKET \ mkdir $TGI_INSTALL_PREFIX && mkdir "$TGI_INSTALL_PREFIX/include" && mkdir "$TGI_INSTALL_PREFIX/lib" && \ - CMAKE_INSTALL_PREFIX=$TGI_INSTALL_PREFIX cargo build --profile ${BUILD_TYPE} --package text-generation-backends-trtllm --bin text-generation-backends-trtllm + RUSTC_WRAPPER=sccache CMAKE_INSTALL_PREFIX=$TGI_INSTALL_PREFIX cargo build --profile ${BUILD_TYPE} --package text-generation-backends-trtllm --bin text-generation-backends-trtllm FROM nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04 AS runtime RUN apt update && apt install -y libucx0 pipx python3-minimal python3-dev python3-pip python3-venv && \