f7942d0bd0
The AI denoise panel now picks between three bases: the existing guided filter, non-local means and a learned SCUNet model run through onnxruntime-node on overlapping tiles. The base is part of the render key, so each model keeps its own cached render and switching back is instant, and jobs report stage and tile progress instead of a bare spinner. onnxruntime-node is pinned to 1.23.0, the last release that ships both macOS architectures, and every Docker and desktop install skips its CUDA download because only the CPU binaries in the package are used. The SCUNet weights and ONNX Runtime are added to the third-party notices, the deb copyright file and the README's denoise, API and redistribution sections.
60 lines
2.1 KiB
Docker
60 lines
2.1 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
# ---------------------------------------------------------------- dependencies
|
|
FROM node:24-bookworm-slim AS deps
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
# onnxruntime-node's postinstall downloads the CUDA build (hundreds of MB) that
|
|
# a CPU-only server never loads; the package itself already carries its CPU
|
|
# binaries, so skip the download in both install stages.
|
|
ENV ONNXRUNTIME_NODE_INSTALL=skip
|
|
RUN npm ci
|
|
|
|
# ---------------------------------------------------------------------- build
|
|
FROM deps AS build
|
|
WORKDIR /app
|
|
COPY tsconfig.json vite.config.ts index.html ./
|
|
COPY src ./src
|
|
# Vite copies public/ into dist/, so the served PDF (in-app Guide link) needs it here.
|
|
COPY public ./public
|
|
# The build writes the .br/.gz asset copies the server prefers to send.
|
|
COPY scripts ./scripts
|
|
RUN npm run build
|
|
|
|
# ------------------------------------------------------- production node_modules
|
|
FROM node:24-bookworm-slim AS prod-deps
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production \
|
|
ONNXRUNTIME_NODE_INSTALL=skip
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci --omit=dev && npm cache clean --force
|
|
|
|
# -------------------------------------------------------------------- runtime
|
|
FROM node:24-bookworm-slim AS runtime
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production \
|
|
PORT=8787 \
|
|
HOST=0.0.0.0 \
|
|
LUMINARY_DATA=/data
|
|
|
|
COPY --from=prod-deps /app/node_modules ./node_modules
|
|
COPY package.json ./
|
|
COPY server ./server
|
|
COPY --from=build /app/dist ./dist
|
|
|
|
# Fail the build, not the first request, if the guide or the UI is missing.
|
|
RUN test -f dist/index.html && test -f dist/luminary-user-guide.pdf
|
|
|
|
# The catalog lives on a volume; it must be writable by the unprivileged user.
|
|
RUN mkdir -p /data && chown -R node:node /data /app
|
|
USER node
|
|
|
|
EXPOSE 8787
|
|
VOLUME ["/data"]
|
|
|
|
# node is guaranteed present, so no curl/wget needed in the image.
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
|
CMD node -e "fetch('http://127.0.0.1:'+(process.env.PORT||8787)+'/api/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
|
|
|
|
CMD ["node", "server/index.mjs"]
|