Skip to content

Commit

Permalink
feat(single-tenant-host): Embedder and Text Embeddings Inference adde…
Browse files Browse the repository at this point in the history
…d to the stack (#9753)
  • Loading branch information
rafaelromcar-parabol authored May 14, 2024
1 parent 9a904d3 commit 5ec8f45
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ stats.json
storybook-static/
test-report.xml
webpack-assets.json
**/data
2 changes: 1 addition & 1 deletion docker/images/parabol-ubi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ _Assumes redis, rethinkdb, and postgres already running to have operational stac

The commands below will start a Parabol container on the target tag specified in \_DOCKER_TAG export. It will volume mount a .env in your current working directory to the container, so you can pass in any .env in your current working directory.

For a more detailed how-to deploy Parabol, please go to the section [docker-host-st](https://github.com/ParabolInc/parabol/tree/master/docker/parabol-ubi/docker-host-st)
For a more detailed how-to deploy Parabol, please go to the section [docker-host-st](https://github.com/ParabolInc/parabol/tree/master/docker/stacks/single-tenant-host/)

- Run the PreDeploy script

Expand Down
12 changes: 10 additions & 2 deletions docker/stacks/single-tenant-host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ Chronos isn't started by default. If it needs to run, it must be managed using `

This will run `pre-deploy` and thus it will recreate the `web-server` and the `gql-executor`.

## Running Embedder

Embedder isn't started by default. If it needs to run, it must be managed using `docker compose --profile databases --profile parabol --profile embedder up`.

This will run `pre-deploy` and thus it will recreate the `web-server` and the `gql-executor`.

The Embedder requires a model. It can be provided using the **Text Embeddings Inference** container available on the stack. It can be executed with `docker compose --profile databases --profile text-embeddings --profile parabol --profile embedder up`

## Database debug

Some tools are available to debug the databases is needed:
Expand All @@ -38,5 +46,5 @@ To operate them use `docker compose up --profile databases --profile database-de

## Running the whole stack

- Start the whole stack: `docker compose --profile databases --profile parabol --profile database-debug --profile chronos up -d`.
- Stop the stack: `docker compose --profile databases --profile parabol --profile database-debug --profile chronos down`.
- Start the whole stack: `docker compose --profile databases --profiles text-embeddings --profile parabol --profile database-debug --profile chronos up --profile embedder -d`.
- Stop the stack: `docker compose --profile databases --profiles text-embeddings --profile parabol --profile database-debug --profile chronos up --profile embedder down`.
36 changes: 36 additions & 0 deletions docker/stacks/single-tenant-host/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ services:
- "8081:8081"
networks:
- parabol-network
text-embeddings-inference:
profiles: ["text-embeddings"]
container_name: text-embeddings-inference
image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.2.2
command:
- "--model-id=llmrails/ember-v1"
platform: linux/x86_64
restart: always
ports:
- "3040:80"
volumes:
- ./data/text-embeddings-inference:/data
networks:
- parabol-network
pre-deploy:
container_name: pre-deploy
profiles: ["parabol"]
Expand Down Expand Up @@ -162,5 +176,27 @@ services:
condition: service_healthy
networks:
- parabol-network
embedder:
container_name: embedder
profiles: ["embedder"]
image: #image:tag
restart: always
command: bash -c "node dist/embedder.js"
env_file: .env
environment:
- SERVER_ID=15
volumes:
- "./.env:/parabol/.env"
depends_on:
pre-deploy:
condition: service_completed_successfully
rethinkdb:
condition: service_started
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- parabol-network
networks:
parabol-network:

0 comments on commit 5ec8f45

Please sign in to comment.