Skip to content

Commit bfcfa35

Browse files
committed
Update Dockerfile to use Node.js 24 and enhance build process
- Changed the base image for the frontend builder to Node.js 24-slim for improved performance and compatibility. - Added commands to copy Node.js and npm from the Node.js 24-slim image, ensuring the latest versions are used in the build environment. - Created symbolic links for npm and npx to streamline package management commands.
1 parent f25cfae commit bfcfa35

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG BASE_IMAGE=ubuntu:24.04
77
# Stage 1: Frontend Builder
88
# Purpose: Compile Vue.js frontend with Vite
99
################################################################################
10-
FROM node:20-slim AS frontend-builder
10+
FROM node:24-slim AS frontend-builder
1111

1212
WORKDIR /build
1313

@@ -120,6 +120,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
120120
&& rm -rf /var/lib/apt/lists/* \
121121
&& apt-get clean
122122

123+
# Node.js 24 (required by llama.cpp engine builds)
124+
COPY --from=node:24-slim /usr/local/bin/node /usr/local/bin/node
125+
COPY --from=node:24-slim /usr/local/lib/node_modules /usr/local/lib/node_modules
126+
RUN ln -sf /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
127+
&& ln -sf /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \
128+
&& node --version \
129+
&& npm --version
130+
123131
# CUDA installation is handled at runtime via the built-in CUDA installer
124132
# All CUDA components (toolkit, cuDNN, TensorRT) are installed to /app/data/cuda/
125133
# which is volume-backed and persists across container restarts

0 commit comments

Comments
 (0)