Files
RecipesCam/docker/backend/Dockerfile
T
3dtours bbc64118a5 fix(heal): upgrade inpaint architecture to hybrid 2-tier LaMa ONNX and fix starburst artifacts
- backend: preserve aspect ratio with edge-replicated square padding into 512x512 LaMa model
- backend: fix inverted mask threshold (>0.85*plane) and prune CUDA/TensorRT binaries for slim image
- frontend: enable server AI by default and route masks >3.5% or edge-crossing to LaMa Tier 2
- frontend: enforce 60%-80% context padding (min 64px) aligned to multiples of 8
- frontend: add 3-5px binary mask dilation and high-frequency sensor grain matching
- frontend: anchor deletion badge to topmost point of brush stroke
- build & export: updated docker containers and recipescam-images.tar.gz (357MB)
2026-10-17 11:01:00 +07:00

32 lines
1.3 KiB
Docker

# RecipesCam API — self-contained build (context = this folder).
# Builder compiles TypeScript; runtime carries production deps only.
FROM node:22-slim AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY tsconfig.json ./
COPY src ./src
RUN npm run build && npm prune --omit=dev
# onnxruntime-node ships every platform's runtime, and 260MB of it is the CUDA /
# TensorRT providers this container (CPU inference, no GPU) never loads. The
# bindings for the other two operating systems go the same way; both Linux
# architectures stay so the image can still be built for an ARM host.
RUN rm -rf node_modules/onnxruntime-node/bin/napi-v6/darwin \
node_modules/onnxruntime-node/bin/napi-v6/win32 \
node_modules/onnxruntime-node/bin/napi-v6/linux/x64/libonnxruntime_providers_cuda.so \
node_modules/onnxruntime-node/bin/napi-v6/linux/x64/libonnxruntime_providers_tensorrt.so
FROM node:22-slim
ENV NODE_ENV=production \
PORT=3000 \
DATA_DIR=/data \
INPAINT_MODEL_PATH=/app/models/lama_fp32.onnx
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY package.json ./
COPY models ./models
RUN ln -sf /app/models /models
EXPOSE 3000
CMD ["node", "dist/server.js"]