Skip to content

Commit 67e9fd3

Browse files
authored
docker : prebuild web UI for s390x build [no release] (ggml-org#24829)
1 parent 796f41b commit 67e9fd3

3 files changed

Lines changed: 16 additions & 19 deletions

File tree

.devops/s390x.Dockerfile

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@ ARG BUILD_DATE=N/A
44
ARG APP_VERSION=N/A
55
ARG APP_REVISION=N/A
66

7-
ARG NODE_VERSION=24
8-
9-
FROM docker.io/node:$NODE_VERSION AS web
10-
11-
ARG APP_VERSION
12-
13-
WORKDIR /app/tools/ui
14-
15-
COPY tools/ui/package.json tools/ui/package-lock.json ./
16-
RUN npm ci
17-
18-
COPY tools/ui/ ./
19-
RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
20-
217
### Build Llama.cpp stage
228
FROM docker.io/gcc:${GCC_VERSION} AS build
239

@@ -34,8 +20,6 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
3420
WORKDIR /app
3521
COPY . .
3622

37-
COPY --from=web /app/tools/ui/dist tools/ui/dist
38-
3923
RUN --mount=type=cache,target=/root/.ccache \
4024
--mount=type=cache,target=/app/build \
4125
cmake -S . -B build -G Ninja \

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
build*/
1212

1313
tools/ui/node_modules/
14-
tools/ui/dist/
1514

1615
models/*
1716

.github/workflows/docker.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ jobs:
5858
git tag ${{ steps.srctag.outputs.name }} || exit 0
5959
git push origin ${{ steps.srctag.outputs.name }} || exit 0
6060
61+
build_ui:
62+
name: Build UI
63+
needs: create_tag
64+
uses: ./.github/workflows/ui-build.yml
65+
with:
66+
hf_ui_version: ${{ needs.create_tag.outputs.source_tag }}
67+
6168
prepare_matrices:
6269
name: Prepare Docker matrices
6370
runs-on: ubuntu-24.04
@@ -79,7 +86,7 @@ jobs:
7986
[
8087
{ "tag": "cpu", "dockerfile": ".devops/cpu.Dockerfile", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04" },
8188
{ "tag": "cpu", "dockerfile": ".devops/cpu.Dockerfile", "platforms": "linux/arm64", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04-arm" },
82-
{ "tag": "cpu", "dockerfile": ".devops/s390x.Dockerfile", "platforms": "linux/s390x", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04-s390x" },
89+
{ "tag": "cpu", "dockerfile": ".devops/s390x.Dockerfile", "platforms": "linux/s390x", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04-s390x", "prebuilt_ui": true },
8390
{ "tag": "cuda cuda12", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "12.8.1", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04" },
8491
{ "tag": "cuda cuda12", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "12.8.1", "platforms": "linux/arm64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04-arm" },
8592
{ "tag": "cuda13", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "13.3.0", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04" },
@@ -135,7 +142,7 @@ jobs:
135142
136143
push_to_registry:
137144
name: Push Docker image to Docker Registry
138-
needs: [prepare_matrices, create_tag]
145+
needs: [prepare_matrices, create_tag, build_ui]
139146

140147
runs-on: ${{ matrix.config.runs_on }}
141148
strategy:
@@ -150,6 +157,13 @@ jobs:
150157
fetch-depth: 0
151158
ref: ${{ needs.create_tag.outputs.source_tag }}
152159

160+
- name: Download prebuilt UI
161+
if: ${{ matrix.config.prebuilt_ui == true }}
162+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
163+
with:
164+
name: ui-build
165+
path: tools/ui/dist
166+
153167
- name: Set up QEMU
154168
if: ${{ contains(matrix.config.platforms, 'linux/amd64') }}
155169
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4

0 commit comments

Comments
 (0)