From d52f7f46f5f14e786a078b8d0a6fb8430d2c4881 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 24 Mar 2026 09:43:01 +0900 Subject: [PATCH] Fix required model files not found locally error --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ce07739..8badc05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,12 +41,6 @@ COPY . . # Your package.json must contain a "build" script, such as `"build": "tsc"` RUN pnpm build -# Pre-download any ML models or files the agent needs -# This ensures the container is ready to run immediately without downloading -# dependencies at runtime, which improves startup time and reliability -# Your package.json must contain a "download-files" script, such as `"download-files": "pnpm run build && node dist/agent.js download-files"` -RUN pnpm download-files - # Remove dev dependencies for a leaner production image RUN pnpm prune --prod @@ -72,6 +66,11 @@ COPY --from=build --chown=appuser:appuser /app /app USER appuser +# Pre-download any ML models or files the agent needs +# This ensures the container is ready to run immediately without downloading +# dependencies at runtime, which improves startup time and reliability +RUN node dist/main.js download-files + # Set Node.js to production mode ENV NODE_ENV=production