forked from loftyoutcome/k8s-rag-llm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Create Vector Databas | ||
|
||
## Run locally | ||
Create a venv and install requirements.txt | ||
|
||
Locally vector db creation can be run in two modes: local dir or s3. | ||
|
||
Please see template files | ||
```shell | ||
.env_local_template | ||
.env_s3_template | ||
``` | ||
|
||
To run the app You can either export all required env vars or prepare an .env file and run | ||
```shell | ||
uv run createvectordb.py | ||
or | ||
python createvectordb.py | ||
``` | ||
|
||
Or You can pass the file: | ||
```shell | ||
uv run createvectordb.py --env_file backup-.env | ||
``` | ||
|
||
## Run tests | ||
Also install in your venv requirements-dev.tx and call | ||
```shell | ||
uv run pytest | ||
``` | ||
|
||
## Run in k8s | ||
Using pydantic settings introduces one impediment. Before running | ||
```shell | ||
envsubst < createvdb.yaml | kubectl apply -f - | ||
``` | ||
We must make sure all env variables are exported. If for ex EMBEDDING_CHUNK_SIZE is not set in our terminal, | ||
envsubst will put an empty string there and pydantic settings will complain that they can't change | ||
empty setting to integer. |