ci : add HF_TOKEN to docker.yml workflow [no ci] (#3861)

This commit adds the HF_TOKEN secret to the docker workflows to avoid HF
rate limiting which currently sometimes causes the jobs to fail.

Refs: https://github.com/ggml-org/whisper.cpp/actions/runs/27053852601/job/79854251771
This commit is contained in:
Daniel Bevenius 2026-06-06 18:34:40 +02:00 committed by GitHub
parent 574fc0da69
commit a8ec021f27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 5 deletions

View File

@ -25,7 +25,7 @@ ENV LD_LIBRARY_PATH /usr/local/cuda-${CUDA_MAIN_VERSION}/compat:$LD_LIBRARY_PATH
COPY .. .
# Enable cuBLAS
RUN make base.en CMAKE_ARGS="-DGGML_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES='75;80;86;90'"
RUN --mount=type=secret,id=HF_TOKEN,required=false,env=HF_TOKEN make base.en CMAKE_ARGS="-DGGML_CUDA=1 -DCMAKE_CUDA_ARCHITECTURES='75;80;86;90'"
RUN find /app/build -name "*.o" -delete && \
find /app/build -name "*.a" -delete && \

View File

@ -10,7 +10,8 @@ RUN apt-get update && \
COPY .. .
# Enable SYCL
ARG GGML_SYCL_F16=OFF
RUN if [ "${GGML_SYCL_F16}" = "ON" ]; then \
RUN --mount=type=secret,id=HF_TOKEN,required=false,env=HF_TOKEN \
if [ "${GGML_SYCL_F16}" = "ON" ]; then \
echo "GGML_SYCL_F16 is set" \
&& export OPT_SYCL_F16="-DGGML_SYCL_F16=ON"; \
fi && \

View File

@ -16,7 +16,7 @@ RUN apt-get update && \
COPY .. .
# Enable muBLAS
RUN make base.en CMAKE_ARGS="-DGGML_MUSA=1"
RUN --mount=type=secret,id=HF_TOKEN,required=false,env=HF_TOKEN make base.en CMAKE_ARGS="-DGGML_MUSA=1"
RUN find /app/build -name "*.o" -delete && \
find /app/build -name "*.a" -delete && \

View File

@ -6,7 +6,7 @@ RUN apt-get update && \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
COPY .. .
RUN make base.en CMAKE_ARGS="-DGGML_VULKAN=1"
RUN --mount=type=secret,id=HF_TOKEN,required=false,env=HF_TOKEN make base.en CMAKE_ARGS="-DGGML_VULKAN=1"
FROM ubuntu:24.04 AS runtime
WORKDIR /app

View File

@ -6,7 +6,7 @@ RUN apt-get update && \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
COPY .. .
RUN make base.en
RUN --mount=type=secret,id=HF_TOKEN,required=false,env=HF_TOKEN make base.en
FROM ubuntu:22.04 AS runtime
WORKDIR /app

View File

@ -69,3 +69,5 @@ jobs:
platforms: ${{ matrix.config.platform }}
tags: ${{ steps.tags.outputs.tags }}
file: ${{ matrix.config.dockerfile }}
secrets: |
HF_TOKEN=${{ secrets.HF_TOKEN }}