From d2cd24bfd2a39dbd865277000a394a40eae642c0 Mon Sep 17 00:00:00 2001 From: nai-degen Date: Sun, 7 Jan 2024 12:58:50 -0600 Subject: [PATCH] suggest larger nodejs max heap --- docker/huggingface/Dockerfile | 3 ++- docs/deploy-huggingface.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/huggingface/Dockerfile b/docker/huggingface/Dockerfile index 7ab1c36..c2bec6c 100644 --- a/docker/huggingface/Dockerfile +++ b/docker/huggingface/Dockerfile @@ -10,4 +10,5 @@ COPY Dockerfile greeting.md* .env* ./ RUN npm run build EXPOSE 7860 ENV NODE_ENV=production -CMD [ "npm", "start" ] +# Huggigface free VMs have 16GB of RAM so we can be greedy +CMD [ "npm", "start", "--", "--max-old-space-size=12288" ] diff --git a/docs/deploy-huggingface.md b/docs/deploy-huggingface.md index 968b1c9..f59c165 100644 --- a/docs/deploy-huggingface.md +++ b/docs/deploy-huggingface.md @@ -32,7 +32,7 @@ COPY Dockerfile greeting.md* .env* ./ RUN npm run build EXPOSE 7860 ENV NODE_ENV=production -CMD [ "npm", "start" ] +CMD [ "npm", "start", "--", "--max-old-space-size=12288" ] ``` - Click "Commit new file to `main`" to save the Dockerfile.