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
Feature: create a Dockerfile for containerization of the repo-query #15
Conversation
Hey. This is great. |
Maybe I am missing something, how can the Repo-Query container establish a connection with the Qdrant instance running on a separate container? Since it'll be making requests to its port 6334 for connecting to Qdrant, should we set the |
The typical default network for docker is the So, in my example, repo-query attaches to port Running my example above, you can see both the containers on the
Since they are on the same network, they can communicate. The repo-query client can egress traffic to the qdrant database without also needing the Were you having problems running this? Is there something missing where the repo-query engine also needs the Using the Another thing to mention is that |
Another thing to consider is that we don't want to have a container that has both the repo-query engine and the qdrant database tied together. Ideally, the repo-query engine can exist as a sole microservice that can connect to any qdrant database (running in a different container, running as a cloud service, etc.) and can execute tasks without being directly attached to monolithic data. Coupling those two together will be painful when scaling is needed. |
- Includes a makefile for easier operations - Fixes problem with empty env variable strings being populated in repo-query Signed-off-by: John McBride <john@opensauced.pizza>
I had changed my Docker network configs which ended up in the two containers running on different networks instead of the default bridge that you mentioned. After reverting those changes and with docker-compose, the service worked as expected. Thank you. |
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.
This is nice and clear for me to grok 👍🏾
also works for me locally. Thanks for updating the README with context as well.
Description
This PR encompasses about a days worth of research and investigation into building and containerizing the repo-query engine. Ideally, for easier deployments, we'd use a flexible container image and some container orchestration service to spin these up:
slim-bullseye
base image which has the rust toolchain.build-essential
package for theg++
C++ compiler in order to build some of the onnx / rust dependencieslibssl-dev
(the openssl libraries for the native-tls dependency) andpkg-config
(to enable the rust toolchain to find the openssl libraries). This isn't super ideal: it'd be great if we could not consume openssl as a dependency but this change would require some upstream changes to a few libraries we use.rustls-tls
feature turned on. This was an attempt to remove the native-tls dependency from our chain of dependencies but I decided to leave this change since we probably shouldn't be consuming all default freatures from reqwest or tokio to reduce the attack surface area of new CVEs that may arrise within their http/tls chainsload-dynamic
feature on theort
dependency which enables us to drop the onnx runtime libraries next to the repo-query binary and get picked up with theORT_DYLIB_PATH
env variable.make lint
This PR also includes a makefile for easier operations and a few rust fixes for the edge case where env variables are empty strings.
With this running, i can first run the qdrant container:
And then also run our container (after building it)
This also includes a
docker-compose.yaml
file which can be used to easily spin up the entire service locally with a database:What type of PR is this? (check all applicable)
Related Tickets & Documents
Related to #10
Mobile & Desktop Screenshots/Recordings
N/a
Added tests?
Added to documentation?
TODO: need to add docs in the README.md for this.
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?