Skip to content

Conversation

@codefromthecrypt
Copy link
Contributor

@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!

Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
@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
Contributor Author

cc @anuraaga

Copy link
Contributor 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

- 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
Contributor 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

pip install -r requirements.txt
# Add opentelemetry instrumentation for these dependencies
edot-bootstrap >> requirements.txt
# Missing dependency for langtrace vertexai instrumentation
Copy link
Contributor 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
Contributor 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.

3 participants