Skip to content

Commit

Permalink
Had to split data and document dbs as postgis and pgvector didn;t pla…
Browse files Browse the repository at this point in the history
…y nice. TODO to create DB container which supports both. SOme exist but didn't work
  • Loading branch information
dividor committed May 5, 2024
1 parent 64d6a1f commit eaef65d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 26 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Robocorp AI Actions API - [http://localhost:3001/](http://localhost:3001/)
TODO: This will be automated, but for now ...

1. Got to [chat app](http://localhost:3080/) and register a user on the login page
2. Select "Plugins' endpoint at top, then in the plugin box go to store and activate
- Humanitariuan Data Assistant
- Humanitarian Data Recipes
- Code sherpa, when asked enter URL http://code-interpretor:3333
3. Populate system prompts, see `./assistant/recipes_assistant/prompts`, build presets
2. Log in
3. `docker exec -it haa-ingestion /bin/bash`
4. `python3 ingest.py`
Expand Down Expand Up @@ -71,11 +76,12 @@ One thing to mention on an Azure deploy, it that doesn't get pushed to the web a

### On a Mac

Make dure docker has 'Use Rosetta for x86_64/amd64 emulation on Apple Silicon' set in settings if using a MAC silicon chip. The deploy script can then build images that wwok on Azure then revert to images that work on your Mac.
Make sure docker has 'Use Rosetta for x86_64/amd64 emulation on Apple Silicon' set in settings if using a MAC silicon chip. The deploy script can then build images that wwok on Azure then
revert to images that work on your Mac.

Note:

`docker-compose-azure.yml` is the configurtation used in the deployment center screen on the web app
`docker-compose-azure.yml` is the configutation used in the deployment center screen on the web app
`docker-compose.yml` is used for building locally

## Databases
Expand Down
64 changes: 40 additions & 24 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
target: /app/librechat.yaml
mongodb:
#platform: linux/amd64
container_name: haa-mongodb
container_name: haa-libre-chat-mongodb
image: mongo
restart: always
user: "${UID}:${GID}"
Expand All @@ -52,7 +52,7 @@ services:
command: mongod --noauth
meilisearch:
#platform: linux/amd64
container_name: haa-meilisearch
container_name: haa-libre-chat-meilisearch
image: getmeili/meilisearch:v1.7.3
restart: always
user: "${UID}:${GID}"
Expand All @@ -61,6 +61,25 @@ services:
MEILI_NO_ANALYTICS: true
volumes:
- ./ui/recipes_assistant_chat/meili_data_v1.7:/meili_data
rag-api:
#platform: linux/amd64
image: ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest
container_name: haa-libre-chat-rag-api
environment:
DB_HOST: datadb
POSTGRES_DB: ${POSTGRES_DATA_DB}
POSTGRES_USER: ${POSTGRES_DATA_USER}
POSTGRES_PASSWORD: ${POSTGRES_DATA_PASSWORD}
RAG_PORT: ${RAG_PORT:-8000}
RAG_OPENAI_API_KEY: ${AZURE_API_KEY}
EMBEDDINGS_PROVIDER: azure
EMBEDDINGS_MODEL: text-embedding-ada-002
AZURE_OPENAI_ENDPOINT: https://dkopenai2.openai.azure.com/
restart: always
depends_on:
- docsdb
env_file:
- .env
datadb:
#platform: linux/amd64
image: postgis/postgis:12-3.4
Expand All @@ -71,9 +90,24 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_DATA_PASSWORD}
restart: always
ports:
- 5432:5432
- 5433:5432
volumes:
- ./ui/recipes_assistant_chat/datadb:/var/lib/postgresql/data
env_file:
- .env
docsdb:
#platform: linux/amd64
image: ankane/pgvector:latest
container_name: haa-docsdb
environment:
POSTGRES_DB: ${POSTGRES_DATA_DB}
POSTGRES_USER: ${POSTGRES_DATA_USER}
POSTGRES_PASSWORD: ${POSTGRES_DATA_PASSWORD}
restart: always
ports:
- 5434:5432
volumes:
- ./ui/recipes_assistant_chat/pgdata2:/var/lib/postgresql/data
- ./ui/recipes_assistant_chat/docsdb:/var/lib/postgresql/data
env_file:
- .env
recipedb:
Expand All @@ -86,28 +120,10 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_RECIPE_PASSWORD}
restart: always
ports:
- 5439:5432
- 5435:5432
volumes:
- ./actions/actions_plugins/recipe-server/db/:/docker-entrypoint-initdb.d
env_file:
- .env
rag-api:
#platform: linux/amd64
image: ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest
container_name: haa-rag-api
environment:
DB_HOST: datadb
POSTGRES_DB: ${POSTGRES_DATA_DB}
POSTGRES_USER: ${POSTGRES_DATA_USER}
POSTGRES_PASSWORD: ${POSTGRES_DATA_PASSWORD}
RAG_PORT: ${RAG_PORT:-8000}
RAG_OPENAI_API_KEY: ${AZURE_API_KEY}
EMBEDDINGS_PROVIDER: azure
EMBEDDINGS_MODEL: text-embedding-ada-002
AZURE_OPENAI_ENDPOINT: https://dkopenai2.openai.azure.com/
restart: always
depends_on:
- datadb
- ./ui/recipes_assistant_chat/recipesdb:/var/lib/postgresql/data
env_file:
- .env
actions:
Expand Down

0 comments on commit eaef65d

Please sign in to comment.