From cc8bc69d25f55095dc0373284d31b901fba12078 Mon Sep 17 00:00:00 2001 From: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> Date: Wed, 16 Apr 2025 09:43:20 +0200 Subject: [PATCH 1/7] Bump `sccache-action` to 0.0.9 --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 92620c25..e2b6db13 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@v4 - uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.7 + uses: mozilla-actions/sccache-action@v0.0.9 - name: Compile project env: SCCACHE_GHA_ENABLED: "true" From 1bd9786f4a260940595557a8df3937c676aba9b0 Mon Sep 17 00:00:00 2001 From: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> Date: Wed, 16 Apr 2025 10:11:00 +0200 Subject: [PATCH 2/7] Bump `SCCACHE` version to 0.10.0 in Dockerfiles --- Dockerfile | 10 +++++----- Dockerfile-cuda | 2 +- Dockerfile-cuda-all | 2 +- Dockerfile-intel | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9525eac0..936446d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM lukemathwalker/cargo-chef:latest-rust-1.85-bookworm AS chef WORKDIR /usr/src -ENV SCCACHE=0.5.4 +ENV SCCACHE=0.10.0 ENV RUSTC_WRAPPER=/usr/local/bin/sccache # Donwload, configure sccache @@ -27,9 +27,9 @@ ARG DOCKER_LABEL ARG SCCACHE_GHA_ENABLED RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ -| gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | \ - tee /etc/apt/sources.list.d/oneAPI.list + | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | \ + tee /etc/apt/sources.list.d/oneAPI.list RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ intel-oneapi-mkl-devel=2024.0.0-49656 \ @@ -43,7 +43,7 @@ COPY --from=planner /usr/src/recipe.json recipe.json RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ - cargo chef cook --release --features ort,candle,mkl --no-default-features --recipe-path recipe.json && sccache -s + cargo chef cook --release --features ort,candle,mkl --no-default-features --recipe-path recipe.json && sccache -s COPY backends backends COPY core core diff --git a/Dockerfile-cuda b/Dockerfile-cuda index 3ffc13ee..273b5079 100644 --- a/Dockerfile-cuda +++ b/Dockerfile-cuda @@ -1,6 +1,6 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder -ENV SCCACHE=0.5.4 +ENV SCCACHE=0.10.0 ENV RUSTC_WRAPPER=/usr/local/bin/sccache ENV PATH="/root/.cargo/bin:${PATH}" # aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.85-bookworm` diff --git a/Dockerfile-cuda-all b/Dockerfile-cuda-all index 76ad31ff..e7b55771 100644 --- a/Dockerfile-cuda-all +++ b/Dockerfile-cuda-all @@ -1,6 +1,6 @@ FROM nvidia/cuda:12.2.0-devel-ubuntu22.04 AS base-builder -ENV SCCACHE=0.5.4 +ENV SCCACHE=0.10.0 ENV RUSTC_WRAPPER=/usr/local/bin/sccache ENV PATH="/root/.cargo/bin:${PATH}" # aligned with `cargo-chef` version in `lukemathwalker/cargo-chef:latest-rust-1.85-bookworm` diff --git a/Dockerfile-intel b/Dockerfile-intel index 09be4061..d7c65a3f 100644 --- a/Dockerfile-intel +++ b/Dockerfile-intel @@ -1,7 +1,8 @@ ARG PLATFORM=cpu FROM lukemathwalker/cargo-chef:latest-rust-1.85-bookworm AS chef WORKDIR /usr/src -ENV SCCACHE=0.5.4 + +ENV SCCACHE=0.10.0 ENV RUSTC_WRAPPER=/usr/local/bin/sccache # Download and configure sccache From 0640fd5541c0d768beb090bfeff84c6afc516368 Mon Sep 17 00:00:00 2001 From: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> Date: Wed, 16 Apr 2025 10:16:29 +0200 Subject: [PATCH 3/7] Bump `SSCACHE` to 0.10.0 in `linting.yaml` --- .github/workflows/liniting.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/liniting.yaml b/.github/workflows/liniting.yaml index f1b158e5..01f1feb4 100644 --- a/.github/workflows/liniting.yaml +++ b/.github/workflows/liniting.yaml @@ -14,7 +14,7 @@ jobs: env: SCCACHE_GHA_ENABLED: "on" RUSTC_WRAPPER: /usr/local/bin/sccache - SCCACHE: 0.3.3 + SCCACHE: 0.10.0 steps: - uses: actions/checkout@v2 From c305d76fc346bf203bda6fbf71a105d1cd81303a Mon Sep 17 00:00:00 2001 From: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> Date: Wed, 16 Apr 2025 10:19:33 +0200 Subject: [PATCH 4/7] Specify `sccache` version in `sccache-action` --- .github/workflows/test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e2b6db13..6bd859d2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -32,6 +32,8 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.9 + with: + version: "v0.10.0" - name: Compile project env: SCCACHE_GHA_ENABLED: "true" From 7415aed10af7066658cae7cb529fb38175c6fc79 Mon Sep 17 00:00:00 2001 From: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> Date: Wed, 16 Apr 2025 10:27:49 +0200 Subject: [PATCH 5/7] Rename `ACTIONS_CACHE_URL` to `ACTIONS_RESULTS_URL` --- .github/workflows/build.yaml | 6 +++--- Dockerfile | 6 +++--- Dockerfile-cuda | 8 ++++---- Dockerfile-cuda-all | 14 +++++++------- Dockerfile-intel | 6 +++--- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3cb8a221..caecbc07 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -71,7 +71,7 @@ jobs: uses: actions/github-script@v6 with: script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Inject slug/short variables @@ -134,7 +134,7 @@ jobs: DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} ${{matrix.extraBuildArgs}} secrets: | - actions_cache_url=${{ env.ACTIONS_CACHE_URL }} + actions_cache_url=${{ env.ACTIONS_RESULTS_URL }} actions_runtime_token=${{ env.ACTIONS_RUNTIME_TOKEN }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -176,7 +176,7 @@ jobs: DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} ${{matrix.extraBuildArgs}} secrets: | - actions_cache_url=${{ env.ACTIONS_CACHE_URL }} + actions_cache_url=${{ env.ACTIONS_RESULTS_URL }} actions_runtime_token=${{ env.ACTIONS_RUNTIME_TOKEN }} tags: ${{ steps.meta-grpc.outputs.tags }} labels: ${{ steps.meta-grpc.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 936446d5..97d3c4e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ RUN echo "int mkl_serv_intel_cpu_true() {return 1;}" > fakeintel.c && \ COPY --from=planner /usr/src/recipe.json recipe.json -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ cargo chef cook --release --features ort,candle,mkl --no-default-features --recipe-path recipe.json && sccache -s @@ -53,7 +53,7 @@ COPY Cargo.lock ./ FROM builder AS http-builder -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ cargo build --release --bin text-embeddings-router --features ort,candle,mkl,http --no-default-features && sccache -s @@ -67,7 +67,7 @@ RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \ COPY proto proto -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ cargo build --release --bin text-embeddings-router --features ort,candle,mkl,grpc --no-default-features && sccache -s diff --git a/Dockerfile-cuda b/Dockerfile-cuda index 273b5079..537ad59f 100644 --- a/Dockerfile-cuda +++ b/Dockerfile-cuda @@ -47,7 +47,7 @@ ARG SCCACHE_GHA_ENABLED WORKDIR /usr/src -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \ then \ @@ -64,7 +64,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ COPY --from=planner /usr/src/recipe.json recipe.json -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \ then \ @@ -81,7 +81,7 @@ COPY Cargo.lock ./ FROM builder AS http-builder -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \ then \ @@ -104,7 +104,7 @@ RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \ COPY proto proto -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ ${CUDA_COMPUTE_CAP} -ge 75 -a ${CUDA_COMPUTE_CAP} -lt 80 ]; \ then \ diff --git a/Dockerfile-cuda-all b/Dockerfile-cuda-all index e7b55771..5dca432a 100644 --- a/Dockerfile-cuda-all +++ b/Dockerfile-cuda-all @@ -49,7 +49,7 @@ WORKDIR /usr/src COPY --from=planner /usr/src/recipe.json recipe.json -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ $VERTEX = "true" ]; \ then \ @@ -58,7 +58,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ cargo chef cook --release --recipe-path recipe.json && sccache -s; \ fi; -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ $VERTEX = "true" ]; \ then \ @@ -67,7 +67,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ CUDA_COMPUTE_CAP=75 cargo chef cook --release --features candle-cuda-turing --recipe-path recipe.json && sccache -s; \ fi; -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ $VERTEX = "true" ]; \ then \ @@ -76,7 +76,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ CUDA_COMPUTE_CAP=80 cargo chef cook --release --features candle-cuda --recipe-path recipe.json && sccache -s; \ fi; -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ $VERTEX = "true" ]; \ then \ @@ -91,7 +91,7 @@ COPY router router COPY Cargo.toml ./ COPY Cargo.lock ./ -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ $VERTEX = "true" ]; \ then \ @@ -102,7 +102,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ RUN mv /usr/src/target/release/text-embeddings-router /usr/src/target/release/text-embeddings-router-75 -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ $VERTEX = "true" ]; \ then \ @@ -113,7 +113,7 @@ RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ RUN mv /usr/src/target/release/text-embeddings-router /usr/src/target/release/text-embeddings-router-80 -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ if [ $VERTEX = "true" ]; \ then \ diff --git a/Dockerfile-intel b/Dockerfile-intel index d7c65a3f..2d4fa5fd 100644 --- a/Dockerfile-intel +++ b/Dockerfile-intel @@ -29,7 +29,7 @@ ARG SCCACHE_GHA_ENABLED COPY --from=planner /usr/src/recipe.json recipe.json -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ cargo chef cook --release --features python --no-default-features --recipe-path recipe.json && sccache -s @@ -47,7 +47,7 @@ RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \ FROM builder AS http-builder -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ cargo build --release --bin text-embeddings-router -F python -F http --no-default-features && sccache -s @@ -55,7 +55,7 @@ FROM builder AS grpc-builder COPY proto proto -RUN --mount=type=secret,id=actions_cache_url,env=ACTIONS_CACHE_URL \ +RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \ --mount=type=secret,id=actions_runtime_token,env=ACTIONS_RUNTIME_TOKEN \ cargo build --release --bin text-embeddings-router -F grpc -F python --no-default-features && sccache -s From bc17bf33d43139d71e5793fc6f53cde7d8a83711 Mon Sep 17 00:00:00 2001 From: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> Date: Wed, 16 Apr 2025 10:32:05 +0200 Subject: [PATCH 6/7] Fix secret name for `actions_results_url` --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index caecbc07..1819fb01 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -134,7 +134,7 @@ jobs: DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} ${{matrix.extraBuildArgs}} secrets: | - actions_cache_url=${{ env.ACTIONS_RESULTS_URL }} + actions_results_url=${{ env.ACTIONS_RESULTS_URL }} actions_runtime_token=${{ env.ACTIONS_RUNTIME_TOKEN }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -176,7 +176,7 @@ jobs: DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }} ${{matrix.extraBuildArgs}} secrets: | - actions_cache_url=${{ env.ACTIONS_RESULTS_URL }} + actions_results_url=${{ env.ACTIONS_RESULTS_URL }} actions_runtime_token=${{ env.ACTIONS_RUNTIME_TOKEN }} tags: ${{ steps.meta-grpc.outputs.tags }} labels: ${{ steps.meta-grpc.outputs.labels }} From edc35c42d0a8a751cea96113c1b70be8c1b1d5e7 Mon Sep 17 00:00:00 2001 From: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> Date: Wed, 16 Apr 2025 10:35:10 +0200 Subject: [PATCH 7/7] Update `linting.yaml` with recent `sccache` changes --- .github/workflows/liniting.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/liniting.yaml b/.github/workflows/liniting.yaml index 01f1feb4..b2e3258b 100644 --- a/.github/workflows/liniting.yaml +++ b/.github/workflows/liniting.yaml @@ -41,7 +41,7 @@ jobs: uses: actions/github-script@v6 with: script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); core.exportVariable('SCCACHE_GHA_CACHE_TO', 'sccache-${{runner.os}}-${{github.ref_name}}'); core.exportVariable('SCCACHE_GHA_CACHE_FROM', 'sccache-${{runner.os}}-main,sccache-${{runner.os}}-');