Skip to content
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

chatbot-rag-app: reduces docker image size #407

Merged
merged 1 commit into from
Feb 25, 2025
Merged

Conversation

codefromthecrypt
Copy link
Collaborator

@codefromthecrypt codefromthecrypt commented Feb 25, 2025

This reduces the chatbot-rag-app image size from 1.3GB to 820MB by eliminating ancillary packages.

This is more needed when we use k8s which doesn't share an image cache with docker, typically. When demo'ing we want the least download lag possible. Also, my network is not always very strong, so prefer smaller.

While at it, I did a little polishing, too.

Anecdotally, I tried to switch to alpine, but the amount of system packages needed resulted in a larger image than it is now!

@codefromthecrypt codefromthecrypt changed the title chatbot-rag-app: uses alpine for a smaller docker image chatbot-rag-app: reduces docker image size Feb 25, 2025
@codefromthecrypt codefromthecrypt marked this pull request as ready for review February 25, 2025 08:26
@codefromthecrypt
Copy link
Collaborator Author

cc @anuraaga

Copy link
Collaborator Author

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notes

@@ -69,7 +69,7 @@ services:
- XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY=fhjskloppd678ehkdfdlliverpoolfcr
- SERVER_PUBLICBASEURL=http://127.0.0.1:5601
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'All services are available'"]
test: ["CMD-SHELL", "curl -s http://localhost:5601/api/status | grep -q 'available'"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

easier match, so keep it simple

@@ -165,8 +165,6 @@ pip-compile
pip install -r requirements.txt
# Add opentelemetry instrumentation for these dependencies
edot-bootstrap >> requirements.txt
# Missing dependency for langtrace vertexai instrumentation
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in langtrace 3.3.28

RUN mkdir ./api
RUN mkdir ./data

RUN apt-get update && apt-get install -y \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none of these are required

@codefromthecrypt codefromthecrypt merged commit d0605d2 into main Feb 25, 2025
5 checks passed
@codefromthecrypt codefromthecrypt deleted the smaller-docker branch February 25, 2025 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants