fix: skip onnx cuda download for cpu image
This commit is contained in:
@@ -9,6 +9,14 @@ WORKDIR /app
|
||||
# ---- Stage 2: Dependencies ----
|
||||
FROM base AS deps
|
||||
|
||||
# The npm package bundles the CPU runtime. Linux/x64 otherwise assumes CUDA 12
|
||||
# and downloads CUDA EP packages from NuGet during postinstall; that download
|
||||
# is not needed by the CPU ACK images and is fragile behind redirecting proxies.
|
||||
# A CUDA build must explicitly pass --build-arg ONNXRUNTIME_NODE_INSTALL=cuda12
|
||||
# and use a CUDA-capable runner image; that path is not enabled by default here.
|
||||
ARG ONNXRUNTIME_NODE_INSTALL=skip
|
||||
ENV ONNXRUNTIME_NODE_INSTALL=$ONNXRUNTIME_NODE_INSTALL
|
||||
|
||||
# Native build tools for sharp, @napi-rs/canvas
|
||||
RUN apk add --no-cache python3 build-base g++ cairo-dev pango-dev jpeg-dev giflib-dev librsvg-dev
|
||||
|
||||
|
||||
Reference in New Issue
Block a user