From d67c707027ade0b86813c85d19449c787a9fd6a4 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sun, 8 Nov 2026 12:00:07 +0100 Subject: [PATCH] fix: Docker, frontend CI and pip builds fail when the ONNX runtime GPU download times out (#33917) Installing the frontend dependencies makes the onnxruntime-node package download its GPU binaries from GitHub releases, and the whole install fails whenever that download times out. Neither the frontend build nor the Docker image uses those binaries (the image only ships the built frontend), so the Docker build, the frontend CI and building the Python package now skip that download with ONNXRUNTIME_NODE_INSTALL_CUDA=skip. The regular CPU binaries are part of the npm package and are not affected. --- .github/workflows/frontend.yaml | 3 +++ Dockerfile | 3 ++- hatch_build.py | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yaml b/.github/workflows/frontend.yaml index fd37691174..6fd59f4b41 100644 --- a/.github/workflows/frontend.yaml +++ b/.github/workflows/frontend.yaml @@ -16,6 +16,9 @@ concurrency: group: frontend-${{ github.ref }} cancel-in-progress: true +env: + ONNXRUNTIME_NODE_INSTALL_CUDA: skip + jobs: # ── Format, i18n, and production build ──────────────────────────────────── format-and-build: diff --git a/Dockerfile b/Dockerfile index c7fb201b4f..4186ce1f9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,8 @@ WORKDIR /app RUN apk add --no-cache git COPY package.json package-lock.json ./ -RUN npm ci --force +# the frontend build never uses onnxruntime-node's CUDA binaries +RUN ONNXRUNTIME_NODE_INSTALL_CUDA=skip npm ci --force COPY . . ENV APP_BUILD_HASH=${BUILD_HASH} diff --git a/hatch_build.py b/hatch_build.py index 623b368b78..4565377d0e 100644 --- a/hatch_build.py +++ b/hatch_build.py @@ -15,6 +15,7 @@ class CustomBuildHook(BuildHookInterface): if npm is None: raise RuntimeError('NodeJS `npm` is required for building Open Webui but it was not found') stderr.write('### npm install\n') + os.environ.setdefault('ONNXRUNTIME_NODE_INSTALL_CUDA', 'skip') subprocess.run([npm, 'install', '--force'], check=True) # noqa: S603 stderr.write('\n### npm run build\n') node_options = os.environ.get('NODE_OPTIONS', '')