Skip to content

Commit 253ba11

Browse files
allozaurCISC
andauthored
webui: Move static build output from repo code to HF Bucket (ggml-org#22937)
* ci: add workflow to publish webui to Hugging Face bucket * ci: add webui release job to release workflow * ci: test webui release job * chore: Return to default minification strategy for build output files * ci: extract webui build into separate workflow and job * chore: Ignore webui static output + clean up references * chore: Delete legacy webui static output * chore: Ignore webui build static output * fix: Workflow * fix: Versioning naming * chore: Update package name * test: Test CI fix * refactor: Naming * server: implement webui build strategy with HF Bucket support * chore: Remove test workflow * chore: Use WebUI build workflow call in other workflows * server: HF Buckets fallback for WebUI build * refactor: App name variable * refactor: Naming * fix: Retrieve loading.html * fix: workflow syntax * fix: Rewrite malformed release.yml * fix: Req param * test: Re-add missing Playwright installation for CI tests * refactor: Logic & security improvements * refactor: Retrieve publishing jobs and DRY the workflows * fix: Test workflow syntax * fix: Upstream Release Tag for test workflow * chore: Remove test workflow * ci: Run WebUI jobs on `ubuntu-24.04-arm` * refactor: Post-CR cleanup Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com> Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> * refactor: CI cleanup * refactor: Cleanup * test: Test workflow * refactor: use LLAMA_BUILD_NUMBER instead of LLAMA_BUILD_TAG for HF Bucket webui downloads * server: add fallback mechanism for HF Bucket webui downloads from latest directory * fix: Incorrect argument order in file(SHA256) calls for checksum verification * refactor: Use cmake script for handling the HF Bucket download on build time * feat: support local npm build for WebUI assets * refactor: add `HF_ENABLED` flag to control WebUI build/download provisioning * refactor: Cleanup * chore: Remove test workflow * fix: remove s390x from release workflow * fix: add webui-build dependency to ubuntu-22-rocm and windows-hip * Revert "fix: remove s390x from release workflow" This reverts commit debcfff. * fix: Release workflow file * fix: Proper release tag used for HF Bucket upload * fix: Remove duplicate steps in release workflow --------- Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@scala.com>
1 parent 67b2b7f commit 253ba11

33 files changed

Lines changed: 683 additions & 13477 deletions

.editorconfig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ charset = unset
5353
trim_trailing_whitespace = unset
5454
insert_final_newline = unset
5555

56-
[tools/server/public/**]
57-
indent_style = unset
58-
indent_size = unset
59-
end_of_line = unset
60-
charset = unset
61-
trim_trailing_whitespace = unset
62-
insert_final_newline = unset
63-
6456
[benches/**]
6557
indent_style = unset
6658
indent_size = unset

.gitattributes

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ server/webui:
7777
- changed-files:
7878
- any-glob-to-any-file:
7979
- tools/server/webui/**
80-
- tools/server/public/**
8180
server:
8281
- changed-files:
8382
- any-glob-to-any-file:

.github/workflows/release.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ env:
3636
CMAKE_ARGS: "-DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON"
3737

3838
jobs:
39+
webui-build:
40+
name: Build WebUI
41+
uses: ./.github/workflows/webui-build.yml
42+
3943
macOS-cpu:
44+
needs:
45+
- webui-build
46+
4047
strategy:
4148
matrix:
4249
include:
@@ -64,6 +71,12 @@ jobs:
6471
with:
6572
fetch-depth: 0
6673

74+
- name: Download WebUI build artifact
75+
uses: actions/download-artifact@v7
76+
with:
77+
name: webui-build
78+
path: tools/server/public/
79+
6780
- name: ccache
6881
uses: ggml-org/ccache-action@v1.2.21
6982
with:
@@ -100,6 +113,9 @@ jobs:
100113
name: llama-bin-macos-${{ matrix.build }}.tar.gz
101114

102115
ubuntu-cpu:
116+
needs:
117+
- webui-build
118+
103119
strategy:
104120
matrix:
105121
include:
@@ -119,6 +135,12 @@ jobs:
119135
with:
120136
fetch-depth: 0
121137

138+
- name: Download WebUI build artifact
139+
uses: actions/download-artifact@v7
140+
with:
141+
name: webui-build
142+
path: tools/server/public/
143+
122144
- name: ccache
123145
if: ${{ matrix.build != 's390x' }}
124146
uses: ggml-org/ccache-action@v1.2.21
@@ -169,6 +191,9 @@ jobs:
169191
name: llama-bin-ubuntu-${{ matrix.build }}.tar.gz
170192

171193
ubuntu-vulkan:
194+
needs:
195+
- webui-build
196+
172197
strategy:
173198
matrix:
174199
include:
@@ -186,6 +211,12 @@ jobs:
186211
with:
187212
fetch-depth: 0
188213

214+
- name: Download WebUI build artifact
215+
uses: actions/download-artifact@v7
216+
with:
217+
name: webui-build
218+
path: tools/server/public/
219+
189220
- name: ccache
190221
uses: ggml-org/ccache-action@v1.2.21
191222
with:
@@ -237,6 +268,9 @@ jobs:
237268
name: llama-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz
238269

239270
android-arm64:
271+
needs:
272+
- webui-build
273+
240274
runs-on: ubuntu-latest
241275

242276
env:
@@ -249,6 +283,12 @@ jobs:
249283
with:
250284
fetch-depth: 0
251285

286+
- name: Download WebUI build artifact
287+
uses: actions/download-artifact@v7
288+
with:
289+
name: webui-build
290+
path: tools/server/public/
291+
252292
- name: ccache
253293
uses: ggml-org/ccache-action@v1.2.21
254294
with:
@@ -306,6 +346,9 @@ jobs:
306346
name: llama-bin-android-arm64.tar.gz
307347

308348
ubuntu-24-openvino:
349+
needs:
350+
- webui-build
351+
309352
runs-on: ubuntu-24.04
310353

311354
outputs:
@@ -327,6 +370,12 @@ jobs:
327370
with:
328371
fetch-depth: 0
329372

373+
- name: Download WebUI build artifact
374+
uses: actions/download-artifact@v7
375+
with:
376+
name: webui-build
377+
path: tools/server/public/
378+
330379
- name: ccache
331380
uses: ggml-org/ccache-action@v1.2.21
332381
with:
@@ -386,6 +435,9 @@ jobs:
386435
name: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz
387436

388437
windows-cpu:
438+
needs:
439+
- webui-build
440+
389441
runs-on: windows-2025
390442

391443
strategy:
@@ -400,6 +452,12 @@ jobs:
400452
with:
401453
fetch-depth: 0
402454

455+
- name: Download WebUI build artifact
456+
uses: actions/download-artifact@v7
457+
with:
458+
name: webui-build
459+
path: tools/server/public/
460+
403461
- name: ccache
404462
uses: ggml-org/ccache-action@v1.2.21
405463
with:
@@ -438,6 +496,9 @@ jobs:
438496
name: llama-bin-win-cpu-${{ matrix.arch }}.zip
439497

440498
windows:
499+
needs:
500+
- webui-build
501+
441502
runs-on: windows-2025
442503

443504
env:
@@ -461,6 +522,12 @@ jobs:
461522
id: checkout
462523
uses: actions/checkout@v6
463524

525+
- name: Download WebUI build artifact
526+
uses: actions/download-artifact@v7
527+
with:
528+
name: webui-build
529+
path: tools/server/public/
530+
464531
- name: ccache
465532
uses: ggml-org/ccache-action@v1.2.21
466533
with:
@@ -520,6 +587,9 @@ jobs:
520587
name: llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip
521588

522589
windows-cuda:
590+
needs:
591+
- webui-build
592+
523593
runs-on: windows-2022
524594

525595
strategy:
@@ -531,6 +601,12 @@ jobs:
531601
id: checkout
532602
uses: actions/checkout@v6
533603

604+
- name: Download WebUI build artifact
605+
uses: actions/download-artifact@v7
606+
with:
607+
name: webui-build
608+
path: tools/server/public/
609+
534610
- name: Install ccache
535611
uses: ggml-org/ccache-action@v1.2.21
536612
with:
@@ -591,6 +667,9 @@ jobs:
591667
name: cudart-llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
592668

593669
windows-sycl:
670+
needs:
671+
- webui-build
672+
594673
runs-on: windows-2022
595674

596675
defaults:
@@ -629,6 +708,12 @@ jobs:
629708
Expand-Archive -Path "level-zero-win-sdk.zip" -DestinationPath "C:/level-zero-sdk" -Force
630709
"LEVEL_ZERO_V1_SDK_PATH=C:/level-zero-sdk" | Out-File -FilePath $env:GITHUB_ENV -Append
631710
711+
- name: Download WebUI build artifact
712+
uses: actions/download-artifact@v7
713+
with:
714+
name: webui-build
715+
path: tools/server/public/
716+
632717
- name: ccache
633718
uses: ggml-org/ccache-action@v1.2.21
634719
with:
@@ -696,6 +781,9 @@ jobs:
696781
name: llama-bin-win-sycl-x64.zip
697782

698783
ubuntu-24-sycl:
784+
needs:
785+
- webui-build
786+
699787
strategy:
700788
matrix:
701789
build: [fp32, fp16]
@@ -743,6 +831,12 @@ jobs:
743831
wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero-devel_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero-devel.deb
744832
sudo apt-get install -y ./level-zero.deb ./level-zero-devel.deb
745833
834+
- name: Download WebUI build artifact
835+
uses: actions/download-artifact@v7
836+
with:
837+
name: webui-build
838+
path: tools/server/public/
839+
746840
- name: ccache
747841
uses: ggml-org/ccache-action@v1.2.21
748842
with:
@@ -782,6 +876,9 @@ jobs:
782876
name: llama-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz
783877

784878
ubuntu-22-rocm:
879+
needs:
880+
- webui-build
881+
785882
runs-on: ubuntu-22.04
786883

787884
strategy:
@@ -798,6 +895,12 @@ jobs:
798895
with:
799896
fetch-depth: 0
800897

898+
- name: Download WebUI build artifact
899+
uses: actions/download-artifact@v7
900+
with:
901+
name: webui-build
902+
path: tools/server/public/
903+
801904
- name: Free up disk space
802905
uses: ggml-org/free-disk-space@v1.3.1
803906
with:
@@ -885,6 +988,9 @@ jobs:
885988
name: llama-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz
886989

887990
windows-hip:
991+
needs:
992+
- webui-build
993+
888994
runs-on: windows-2022
889995

890996
env:
@@ -901,6 +1007,12 @@ jobs:
9011007
id: checkout
9021008
uses: actions/checkout@v6
9031009

1010+
- name: Download WebUI build artifact
1011+
uses: actions/download-artifact@v7
1012+
with:
1013+
name: webui-build
1014+
path: tools/server/public/
1015+
9041016
- name: Grab rocWMMA package
9051017
id: grab_rocwmma
9061018
run: |
@@ -1147,6 +1259,7 @@ jobs:
11471259
runs-on: ubuntu-slim
11481260

11491261
needs:
1262+
- webui-build
11501263
- windows
11511264
- windows-cpu
11521265
- windows-cuda
@@ -1162,6 +1275,9 @@ jobs:
11621275
- ios-xcode-build
11631276
- openEuler-cann
11641277

1278+
outputs:
1279+
tag_name: ${{ steps.tag.outputs.name }}
1280+
11651281
steps:
11661282
- name: Clone
11671283
id: checkout
@@ -1287,3 +1403,15 @@ jobs:
12871403
});
12881404
}
12891405
}
1406+
1407+
webui-publish:
1408+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1409+
1410+
needs:
1411+
- release
1412+
1413+
uses: ./.github/workflows/webui-publish.yml
1414+
with:
1415+
version_tag: ${{ needs.release.outputs.tag_name }}
1416+
secrets:
1417+
hf_token: ${{ secrets.HF_TOKEN_WEBUI_STATIC_OUTPUT }}

.github/workflows/server-self-hosted.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ concurrency:
3939
cancel-in-progress: true
4040

4141
jobs:
42+
webui-build:
43+
name: Build WebUI
44+
uses: ./.github/workflows/webui-build.yml
45+
4246
server-metal:
47+
needs: webui-build
4348
runs-on: [self-hosted, llama-server, macOS, ARM64]
4449

4550
name: server-metal (${{ matrix.wf_name }})
@@ -67,6 +72,12 @@ jobs:
6772
fetch-depth: 0
6873
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
6974

75+
- name: Download WebUI build artifact
76+
uses: actions/download-artifact@v7
77+
with:
78+
name: webui-build
79+
path: tools/server/public/
80+
7081
- name: Build
7182
id: cmake_build
7283
run: |

0 commit comments

Comments
 (0)