-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: up node memory during docker build #2810
Conversation
…tticexyz#2802) (cherry picked from commit 31e0a4b)
|
Dockerfile
Outdated
ENV NODE_OPTIONS=--max-old-space-size=4096 | ||
RUN pnpm run -r build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know ENV
sticks around in the docker container? as in running the indexer would use 4gb memory too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.docker.com/reference/dockerfile/#env
The ENV instruction sets the environment variable to the value . This value will be in the environment for all subsequent instructions in the build stage and can be replaced inline in many as well.
sounds like just during build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but also seeing
If an environment variable is only needed during build, and not in the final image, consider setting a value for a single command instead:
so I wonder if we use this instead:
RUN NODE_OPTIONS=--max-old-space-size=4096 pnpm run -r build
ok, changed it. For me, the build works like this, as well. I will also do a PR to change it in the "historical_indexer"-branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
applying the same change as on #2802, but on main branch
(cherry picked from commit 31e0a4b)