-
Notifications
You must be signed in to change notification settings - Fork 17
Optimize assistant #36
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
Conversation
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.
Pull Request Overview
This PR optimizes the Appwrite assistant by implementing several Docker and build improvements to reduce image size and increase build performance. The changes focus on switching to a lighter base image, parallelizing operations, removing unnecessary files, and updating version references.
- Docker optimization: Switched from
node:18-alpinetonode:18-slimand removed.gitfolder to reduce final image size by ~675-700MB - Performance improvement: Parallelized document processing operations, reducing build time from 88 seconds to under 5 seconds
- Version updates: Updated references from
1.6.xtocloudacross examples, releases, and configuration files
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Dockerfile | Optimized base image and multi-stage build process for smaller final image |
| src/documents.js | Parallelized documentation and reference fetching with Promise.all |
| scripts/web-sources.js | Parallelized SDK and service downloads, added error handling |
| src/embeddings.js | Fixed typo in function name from intializeDocumentRetriever to initializeDocumentRetriever |
| src/main.js | Updated import to use corrected function name |
| .github/workflows/*.yml | Updated build arguments to use cloud version instead of 1.6.x |
| CONTRIBUTING.md | Updated documentation examples to use cloud version |
| package.json | Added new make-sources script |
| scripts/git-sources.js | Added removal of .git directory after checkout |
| scripts/test-prompts.js | Added new test prompt for static website hosting |
| tests/*.md | Updated test documentation content with newer information and corrected references |
What does this PR do?
This PR does the following -
.gitto shave off another 500MB for a smaller image sizegit checkout {BRANCH}is done, we don't really need the.gitfolder IMO.cloudand not1.6.xFinal image size can be just around ~200MB now.
Test Plan
Manual.
Ran
pnpm test, updated the same examples here in the PR as well.Related PRs and Issues
N/A.
Have you read the Contributing Guidelines on issues?
Yes.