mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-22 21:50:42 -05:00
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.
This commit is contained in:
1 parent
d62199572b
commit
d67c707027
3 files changed
+6
-1
No files matched your search
@@ -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:
|
||||
|
||||
+2
-1
@@ -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}
|
||||
|
||||
@@ -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', '')
|
||||
|
||||
Reference in new issue
Block a user