Self-hosted Docker setup: installing node-llama-cpp for local memory embeddings — is this the right approach?
Running OpenClaw 2026.4.25 in a custom Docker image built on top of ghcr.io/openclaw/openclaw:2026.4.25 on a Linux container (Debian 12 base, NVIDIA GPU available, runtime: nvidia configured in compose).
openclaw memory status --deep fails with:
Local embeddings unavailable.
Reason: optional dependency node-llama-cpp is missing (or failed to install).
Detail: Cannot find package 'node-llama-cpp' imported from
/app/dist/memory-core-host-engine-embeddings-BCID_0RN.js
Config has agents.defaults.memorySearch.provider: "local" with no explicit model path — expecting OpenClaw to auto-download embeddinggemma-300m-qat-Q8_0.gguf.
Proposed Dockerfile fix:
dockerfileRUN apt-get update && apt-get install -y --no-install-recommends
cmake clang libgomp1 &&
rm -rf /var/lib/apt/lists/*
RUN npm install -g node-llama-cpp@3.18.1
Model cache is mounted at /home/node/.node-llama-cpp as a named Docker volume so the auto-downloaded GGUF survives rebuilds.
Questions:
Is npm install -g the correct install pattern for a Dockerfile layered on top of the official OpenClaw image? Or should it go through the OpenClaw plugin mechanism instead?
Are cmake, clang, and libgomp1 sufficient build tools, or does the openclaw base image already include some of these (making them redundant)?
The container has CUDA 12.3 (cuda-cudart-12-3, libcublas-12-3) installed. Will node-llama-cpp automatically detect and use CUDA for embeddings, or does it need additional CUDA libs (e.g. cuda-libraries-12-3) to compile with GPU support?
Separate issue: the memory-core dreaming cron job in jobs.json has no agentId field (all other jobs have agentId: "main"). Dreaming ends with status=timeout and missing scope: operator.admin on cleanup. Is the missing agentId the cause, and is the fix simply adding "agentId": "main" to that job entry?