From 588f110693944eb747c7986f2de24b89e36cce4f Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 6 Sep 2026 12:02:42 +0100 Subject: [PATCH] build(docker): granite is the standalone stack's default embedding model settings.EMBEDDINGS_NAME still defaults to mpnet so an upgraded deployment keeps its index; new installs only get granite because setup.sh writes it to .env. The standalone compose always starts on fresh volumes, so it defaults EMBEDDINGS_NAME to granite (overridable from .env or the shell), and the Docker guide's hand-written .env examples name the model too. --- deployment/docker-compose-standalone.yaml | 5 +++++ docs/content/Deploying/Docker-Deploying.mdx | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/deployment/docker-compose-standalone.yaml b/deployment/docker-compose-standalone.yaml index 0dc9d893..e1512459 100644 --- a/deployment/docker-compose-standalone.yaml +++ b/deployment/docker-compose-standalone.yaml @@ -17,6 +17,9 @@ # develop follows the main branch # DOCSGPT_IMAGE_VARIANT empty (slim, default) or -docling: docling parser # engine, its models, and tesseract baked in (OCR-ready) +# EMBEDDINGS_NAME defaults to granite here (this stack always starts on +# fresh volumes, so there is no older index to keep +# compatible); the code default stays mpnet for upgrades. name: docsgpt services: @@ -47,6 +50,7 @@ services: - CELERY_RESULT_BACKEND=redis://redis:6379/1 - CACHE_REDIS_URL=redis://redis:6379/2 - POSTGRES_URI=postgresql://docsgpt:docsgpt@postgres:5432/docsgpt + - EMBEDDINGS_NAME=${EMBEDDINGS_NAME:-ibm-granite/granite-embedding-311m-multilingual-r2} ports: - "7091:7091" volumes: @@ -75,6 +79,7 @@ services: - CACHE_REDIS_URL=redis://redis:6379/2 - POSTGRES_URI=postgresql://docsgpt:docsgpt@postgres:5432/docsgpt - API_URL=http://backend:7091 + - EMBEDDINGS_NAME=${EMBEDDINGS_NAME:-ibm-granite/granite-embedding-311m-multilingual-r2} volumes: - indexes:/app/indexes - inputs:/app/inputs diff --git a/docs/content/Deploying/Docker-Deploying.mdx b/docs/content/Deploying/Docker-Deploying.mdx index 1fb822c3..00932c35 100644 --- a/docs/content/Deploying/Docker-Deploying.mdx +++ b/docs/content/Deploying/Docker-Deploying.mdx @@ -42,7 +42,9 @@ first use. You do not need the source tree to run them: `INTERNAL_KEY` is the secret the worker uses to hand finished indexes to the API; without it every upload fails with a 401. `setup.sh` generates - one for you, a hand-written `.env` has to include it. + one for you, a hand-written `.env` has to include it. This stack runs the + granite embedding model unless `.env` sets `EMBEDDINGS_NAME`; both granite + and mpnet are baked into the image. 3. **Start it:** @@ -91,9 +93,13 @@ extra packages: `EXTRAS=docling` in `.env`). LLM_PROVIDER=docsgpt VITE_API_STREAMING=true INTERNAL_KEY= + EMBEDDINGS_NAME=ibm-granite/granite-embedding-311m-multilingual-r2 ``` - This minimal configuration tells DocsGPT to use the public API. For more advanced settings and other LLM options, refer to the [DocsGPT Settings Guide](/Deploying/DocsGPT-Settings). + This minimal configuration tells DocsGPT to use the public API. The + `EMBEDDINGS_NAME` line is what `setup.sh` writes for a new install; without + it the code falls back to mpnet, the model earlier releases indexed with, + so that an upgraded deployment keeps its existing index working. For more advanced settings and other LLM options, refer to the [DocsGPT Settings Guide](/Deploying/DocsGPT-Settings). 4. **Launch DocsGPT with Docker Compose:**