-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
🐋 refactor(Dockerfile.multi): Optimize client build by caching npm install step #2275
Conversation
Thanks for this, I will have to test it later but this makes sense to me |
I just thought and have the suspicion that the remote package of |
You may be right. Thank you for your thorough review.
Despite the title of this issue (perhaps poorly worded on my part), this patch implements a speed optimization, not a "fix" per se. I suggest separating the installation of npm dependencies into a distinct cacheable unit of execution by performing the This is aligned with the 10th tip on the Intro Guide to Dockerfile Best Practices. |
Thanks for desiring to apply best practices here. I'm testing now and will merge following successful build |
…stall step (danny-avila#2275) * 🐋 fix(Dockerfile): Optimize client build by caching npm install step * 🐋 fix(Dockerfile): Possible interference from librechat-data-provider in client build
Pull Request Template
Summary
Don't perform an additional npm install unless
./client/package*.json
has actually changed. This allows for minor edits in code (that don't necessitate the introduction of new packages) without the need to rerun npm install, which is notoriously slow and painstaking.Change Type
Checklist