From 05abb5e8c30940f80a9c33d29a940481f2403d2a Mon Sep 17 00:00:00 2001 From: sasha0552 Date: Tue, 8 Oct 2024 15:30:53 +0000 Subject: [PATCH] (vllm) Pass secrets as secrets --- .github/actions/build-vllm/action.yml | 14 +++++++------ .../vllm/v0.5.5/0000-sccache.patch | 20 +++++++------------ .../0002-docker-install-patched-triton.patch | 2 +- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/actions/build-vllm/action.yml b/.github/actions/build-vllm/action.yml index 344d571..8e9ac99 100644 --- a/.github/actions/build-vllm/action.yml +++ b/.github/actions/build-vllm/action.yml @@ -85,14 +85,15 @@ runs: target: build build-args: | - ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} - ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} - SCCACHE_GHA_ENABLED=1 USE_SCCACHE=1 torch_cuda_arch_list=6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX max_jobs=2 nvcc_threads=2 + secrets: | + ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} + ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} + - name: Copy wheel files shell: bash run: tar --extract --file=build.tar --strip-components=1 workspace/dist && rm build.tar @@ -125,10 +126,11 @@ runs: target: vllm-openai build-args: | - ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} - ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} - SCCACHE_GHA_ENABLED=1 USE_SCCACHE=1 torch_cuda_arch_list=6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX max_jobs=2 nvcc_threads=2 + + secrets: | + ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }} + ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }} diff --git a/patches/vllm-project/vllm/v0.5.5/0000-sccache.patch b/patches/vllm-project/vllm/v0.5.5/0000-sccache.patch index 5a136a8..20ae1c1 100644 --- a/patches/vllm-project/vllm/v0.5.5/0000-sccache.patch +++ b/patches/vllm-project/vllm/v0.5.5/0000-sccache.patch @@ -1,26 +1,20 @@ --- a/Dockerfile +++ b/Dockerfile -@@ -85,8 +85,9 @@ ARG buildkite_commit - ENV BUILDKITE_COMMIT=${buildkite_commit} - - ARG USE_SCCACHE --ARG SCCACHE_BUCKET_NAME=vllm-build-sccache --ARG SCCACHE_REGION_NAME=us-west-2 -+ARG ACTIONS_CACHE_URL -+ARG ACTIONS_RUNTIME_TOKEN -+ARG SCCACHE_GHA_ENABLED=0 +@@ -89,14 +89,15 @@ ARG SCCACHE_BUCKET_NAME=vllm-build-sccache + ARG SCCACHE_REGION_NAME=us-west-2 # if USE_SCCACHE is set, use sccache to speed up compilation RUN --mount=type=cache,target=/root/.cache/pip \ ++ --mount=type=secret,id=ACTIONS_CACHE_URL,env=ACTIONS_CACHE_URL \ ++ --mount=type=secret,id=ACTIONS_RUNTIME_TOKEN,env=ACTIONS_RUNTIME_TOKEN \ if [ "$USE_SCCACHE" = "1" ]; then \ -@@ -95,8 +96,9 @@ RUN --mount=type=cache,target=/root/.cache/pip \ + echo "Installing sccache..." \ + && curl -L -o sccache.tar.gz https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz \ && tar -xzf sccache.tar.gz \ && sudo mv sccache-v0.8.1-x86_64-unknown-linux-musl/sccache /usr/bin/sccache \ && rm -rf sccache.tar.gz sccache-v0.8.1-x86_64-unknown-linux-musl \ - && export SCCACHE_BUCKET=${SCCACHE_BUCKET_NAME} \ - && export SCCACHE_REGION=${SCCACHE_REGION_NAME} \ -+ && export ACTIONS_CACHE_URL=${ACTIONS_CACHE_URL} \ -+ && export ACTIONS_RUNTIME_TOKEN=${ACTIONS_RUNTIME_TOKEN} \ -+ && export SCCACHE_GHA_ENABLED=${SCCACHE_GHA_ENABLED} \ ++ && export SCCACHE_GHA_ENABLED=1 \ && export SCCACHE_IDLE_TIMEOUT=0 \ && export CMAKE_BUILD_TYPE=Release \ && sccache --show-stats \ diff --git a/patches/vllm-project/vllm/v0.5.5/0002-docker-install-patched-triton.patch b/patches/vllm-project/vllm/v0.5.5/0002-docker-install-patched-triton.patch index 9a1a545..f869c57 100644 --- a/patches/vllm-project/vllm/v0.5.5/0002-docker-install-patched-triton.patch +++ b/patches/vllm-project/vllm/v0.5.5/0002-docker-install-patched-triton.patch @@ -1,6 +1,6 @@ --- a/Dockerfile +++ b/Dockerfile -@@ -179,7 +179,10 @@ RUN ldconfig /usr/local/cuda-$(echo $CUDA_VERSION | cut -d. -f1,2)/compat/ +@@ -178,7 +178,10 @@ RUN ldconfig /usr/local/cuda-$(echo $CUDA_VERSION | cut -d. -f1,2)/compat/ # install vllm wheel first, so that torch etc will be installed RUN --mount=type=bind,from=build,src=/workspace/dist,target=/vllm-workspace/dist \ --mount=type=cache,target=/root/.cache/pip \