From b37ecf6dcf8e2b6589400f7bf8890802662f7d66 Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Sun, 16 Aug 2026 16:35:35 -0400 Subject: [PATCH 01/11] edit: testing env overrides with object-detection-llm --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4327e0c7..bd500e8b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -191,7 +191,10 @@ services: ca.mcgill.a11y.image.required_dependencies: "content-categoriser" ca.mcgill.a11y.image.optional_dependencies: "" env_file: - ./config/llm.env + - path: ./config/llm.env + required: true + - path: ./preprocessors/object-detection-llm/config/object-detection-llm.env + required: false multistage-diagram-segmentation: profiles: [production, test, default] From f5ccfd68351be53d89046ea114c5cec99a0c3a18 Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Mon, 17 Aug 2026 16:13:54 -0400 Subject: [PATCH 02/11] update: ignore .env files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 2d0969f9..abfbb0e0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ config/imageup.env config/gemini.env *.sh docker-compose.override.yml + +# Ignore all preprocessor-specific LLM override env files +preprocessors/**/config/*.env \ No newline at end of file From 063b19bb5deb9333e766612929e58b53880ca942 Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Mon, 17 Aug 2026 16:25:22 -0400 Subject: [PATCH 03/11] updated readme in preprocessor/config --- preprocessors/object-detection-llm/config/Readme.md | 9 +++++++++ preprocessors/object-detection-llm/config/__init__.py | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 preprocessors/object-detection-llm/config/Readme.md create mode 100644 preprocessors/object-detection-llm/config/__init__.py diff --git a/preprocessors/object-detection-llm/config/Readme.md b/preprocessors/object-detection-llm/config/Readme.md new file mode 100644 index 00000000..10e26e9c --- /dev/null +++ b/preprocessors/object-detection-llm/config/Readme.md @@ -0,0 +1,9 @@ +# OPTIONAL Preprocessor Config + +If a specific preprocessor needs to use a different LLM endpoint or model than the global default at `config/llm.env` (e.g. running a smaller model for a specific preprocessor), create an override file at: +preprocessors//config/.env + +*Note:* This file is optional. If it doesn't exist, the preprocessor falls back to the global `config/llm.env`. If it does exist, any variable set in it takes priority over the global config for that preprocessor only. + +**Important:** if you override any one of `LLM_API_KEY`, `LLM_URL`, or +`LLM_MODEL`, you must set **all three** in the override file. These three variables are tied to a single endpoint. Partially overriding (e.g. only changing `LLM_URL` but leaving the global `LLM_API_KEY`) will send the wrong credentials to the new endpoint and fail authentication. \ No newline at end of file diff --git a/preprocessors/object-detection-llm/config/__init__.py b/preprocessors/object-detection-llm/config/__init__.py new file mode 100644 index 00000000..868896d2 --- /dev/null +++ b/preprocessors/object-detection-llm/config/__init__.py @@ -0,0 +1,2 @@ +# /app/config/__init__.py +# This file marks the config directory as a Python package. \ No newline at end of file From 9bf01c25a48f332b9fa47181775c16cf5e86efc1 Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Mon, 17 Aug 2026 17:34:03 -0400 Subject: [PATCH 04/11] documented override setup for a service --- DEPLOYMENT.md | 26 ++++++++++++++-- config/Readme.md | 16 ++++++++++ docker-compose.yml | 30 +++++++++++++++---- .../object-detection-llm/config/Readme.md | 5 ++++ 4 files changed, 69 insertions(+), 8 deletions(-) diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 4fe5e160..509b6e40 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -199,9 +199,11 @@ networks: ``` # Connecting to, or running your own, visual LLM -Since multiple IMAGE preprocessors us a visual LLM (currently qwen), you need to either specify a cloud endpoint, or run your own LLM locally on your server. +Since multiple IMAGE preprocessors use a visual LLM (currently gemma), you need to either specify a cloud endpoint, or run your own LLM locally on your server. + Our production reference server uses vLLM as the runtime for LLM models. Like Traefik, it runs with its own docker-compose in its own directory on our server (e.g., `/var/docker/ollama`). + It’s not a preprocessor itself; instead, several preprocessors in IMAGE-server call out to whatever LLM endpoint you configure (Ollama/vLLM locally, or a remote API if you set one). For example, the following preprocessors connect to the LLM via env_file `/var/docker/image/config/llm.env`: content-categoriser, graphic-caption, text-followup, and multistage-diagram-segmentation. Key features: - Accepts multimodal graphic and text prompots @@ -217,8 +219,28 @@ You must specifiy services such as: - vllm: runs `vllm/vllm-openai:latest`, reserves a GPU, serves an OpenAI-style API at port 8000. - open-webui: optional WebUI that connects to Ollama or vLLM and is exposed via Traefik with a hostname like `ollama.unicorn.cim.mcgill.ca`. +## Using a different model per preprocessor +By default, `config/llm.env` sets the LLM endpoint and model used by every preprocessor that calls out to a vision LLM. If you want a specific preprocessor to use a different endpoint or model than this default, you can add a preprocessor-specific override. + +In `docker-compose.yml`, preprocessors that support this list two `env_file` entries: +```yaml +env_file: + - path: ./config/llm.env + required: true + - path: ./preprocessors//config/.env + required: false +``` +The global `config/llm.env` is always loaded first; the preprocessor-specific file is loaded second **only if it exists**, and any variable it sets overrides the global value for that preprocessor alone. If the file doesn't exist, the preprocessor simply falls back to the global configuration. No extra setup is required unless you actually want an override. + +To set one up, create a `config` folder inside the service (if it does not already exist) and a `.env` file inside the folder. Set `LLM_API_KEY`, `LLM_URL`, and `LLM_MODEL`. Add this path to the `docker-compose.yml` file's `env_file` entry for that service and set the `required` flag to `False`. + +**If you override any one of these three, set all three**: they describe a single endpoint together, and partially overriding them will send incorrect credentials to the new endpoint and fail the request. + +Preprocessors currently supporting this override pattern (check +`docker-compose.yml` for the current list, as this may grow): +`autour-preprocessor`, `content-categoriser`, `graphic-caption`, `text-followup`, `object-detection-llm`, `multistage-diagram-segmentation`. -GPU Notes: +## GPU Notes: Some containers that require GPU (and don't use a cloud endpoint or the LLM) include espnet-tts, text-followup, semantic-segmentation,object-detection, action-recognition, and so on. You can see which ones need GPU directly in docker-compose.yml since they include a `deploy.resources.reservations.devices` stanza with `driver: nvidia`. TIP: if you run into `Cannot start service ...: could not select device driver "nvidia"`, you can use this checklist to guide you: diff --git a/config/Readme.md b/config/Readme.md index 97d7ef45..212e190d 100644 --- a/config/Readme.md +++ b/config/Readme.md @@ -46,3 +46,19 @@ Following is the sample format of azure-api.env file: ``` AZURE_API_KEY = [INSERT KEY STRING] ``` + +### llm.env +Entries in this env file are required by preprocessors that use an LLM via the shared LLM client ([`utils/llm/client.py`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/utils/llm/client.py)). + +Following is the sample format of llm.env file: +LLM_API_KEY = [INSERT KEY STRING] +LLM_URL = [INSERT OPENAI-COMPATIBLE ENDPOINT URL] +LLM_MODEL = [INSERT MODEL NAME] + +* `LLM_URL` can point at a local model server (e.g. Ollama, vLLM) or a + cloud provider that exposes an OpenAI-compatible API (e.g. OpenRouter). +* `LLM_MODEL` must be a model the chosen endpoint supports. See each + preprocessor's own README for any model-specific requirements (e.g. + supported model families for coordinate/output format). + +**Using a different model per service:** `llm.env` sets the default LLM endpoint and model for *all* preprocessors that use the shared LLM client. If a specific preprocessor needs to use a different endpoint or model than this default, do not edit this file. Instead, go to that preprocessor's own config folder (e.g. `preprocessors/object-detection-llm/config/`) and read its `Readme.md` for instructions on setting up a preprocessor-specific override. This applies to any service — preprocessor, handler, or otherwise — that may support its own override in the future, not just LLM-based preprocessors. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index bd500e8b..79c78b39 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -92,7 +92,10 @@ services: image: ghcr.io/shared-reality-lab/image-preprocessor-autour:${REGISTRY_TAG} restart: "no" env_file: - - ./config/maps.env + - path: ./config/maps.env + required: true + - path: ./preprocessors/autour/config/autour.env + required: false labels: ca.mcgill.a11y.image.preprocessor: 1 ca.mcgill.a11y.image.port: 5000 @@ -113,7 +116,10 @@ services: ca.mcgill.a11y.image.required_dependencies: "" ca.mcgill.a11y.image.optional_dependencies: "" env_file: - ./config/llm.env + - path: ./config/llm.env + required: true + - path: ./preprocessors/content-categoriser/config/content-categoriser.env + required: false environment: - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} - WARMUP_ENABLED=true @@ -129,7 +135,10 @@ services: ca.mcgill.a11y.image.required_dependencies: "" ca.mcgill.a11y.image.optional_dependencies: "" env_file: - ./config/llm.env + - path: ./config/llm.env + required: true + - path: ./preprocessors/graphic-caption/config/graphic-caption.env + required: false environment: - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} - WARMUP_ENABLED=true @@ -152,7 +161,10 @@ services: ca.mcgill.a11y.image.required_dependencies: "" ca.mcgill.a11y.image.optional_dependencies: "" env_file: - ./config/llm.env + - path: ./config/llm.env + required: true + - path: ./preprocessors/text-followup/config/text-followup.env + required: false object-detection: profiles: [default] @@ -217,7 +229,10 @@ services: - SAM_MODEL_PATH=/usr/src/app/models/sam2.1_l.pt - WARMUP_ENABLED=true env_file: - ./config/llm.env + - path: ./config/llm.env + required: true + - path: ./preprocessors/multistage-diagram-segmentation/config/multistage-diagram-segmentation.env + required: false object-grouping: profiles: [production, test, default] @@ -237,7 +252,10 @@ services: image: ghcr.io/shared-reality-lab/image-preprocessor-openstreetmap:${REGISTRY_TAG} restart: "no" env_file: - - ./config/maps.env + - path: ./config/maps.env + required: true + - path: ./preprocessors/openstreetmap/config/openstreetmap.env + required: false labels: ca.mcgill.a11y.image.preprocessor: 3 ca.mcgill.a11y.image.port: 5000 diff --git a/preprocessors/object-detection-llm/config/Readme.md b/preprocessors/object-detection-llm/config/Readme.md index 10e26e9c..d9f089ee 100644 --- a/preprocessors/object-detection-llm/config/Readme.md +++ b/preprocessors/object-detection-llm/config/Readme.md @@ -3,6 +3,11 @@ If a specific preprocessor needs to use a different LLM endpoint or model than the global default at `config/llm.env` (e.g. running a smaller model for a specific preprocessor), create an override file at: preprocessors//config/.env +Set the following fields in the `.env` file: +LLM_API_KEY = [INSERT KEY STRING] +LLM_URL = [INSERT OPENAI-COMPATIBLE ENDPOINT URL] +LLM_MODEL = [INSERT MODEL NAME] + *Note:* This file is optional. If it doesn't exist, the preprocessor falls back to the global `config/llm.env`. If it does exist, any variable set in it takes priority over the global config for that preprocessor only. **Important:** if you override any one of `LLM_API_KEY`, `LLM_URL`, or From 2f685f6caa2bc3e7bd04af1c1fd33fc787a9f923 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 17 Aug 2026 22:10:17 +0000 Subject: [PATCH 05/11] fix: add missing trailing newline in object-detection-llm config package init Co-authored-by: MansiDhanania <106432557+MansiDhanania@users.noreply.github.com> --- preprocessors/object-detection-llm/config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preprocessors/object-detection-llm/config/__init__.py b/preprocessors/object-detection-llm/config/__init__.py index 868896d2..b34fa9b4 100644 --- a/preprocessors/object-detection-llm/config/__init__.py +++ b/preprocessors/object-detection-llm/config/__init__.py @@ -1,2 +1,2 @@ # /app/config/__init__.py -# This file marks the config directory as a Python package. \ No newline at end of file +# This file marks the config directory as a Python package. From f8bdcf370463b399e8dacd8da3d8688695838177 Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Tue, 18 Aug 2026 19:41:18 -0400 Subject: [PATCH 06/11] fix: now saving all env files to config + updated gitignore and docs --- .gitignore | 23 ++++--------------- DEPLOYMENT.md | 4 ++-- config/Readme.md | 6 ++--- docker-compose.yml | 19 ++++++++------- .../object-detection-llm/config/Readme.md | 14 ----------- .../object-detection-llm/config/__init__.py | 2 -- 6 files changed, 19 insertions(+), 49 deletions(-) delete mode 100644 preprocessors/object-detection-llm/config/Readme.md delete mode 100644 preprocessors/object-detection-llm/config/__init__.py diff --git a/.gitignore b/.gitignore index abfbb0e0..fad652f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +1,9 @@ .DS_Store __pycache__/ *.swp -config/maps.env -config/azure-api.env -config/chart.env -config/apis-and-selection.env -config/vision_api_key.json -config/ollama.env -config/healthcheck.env -config/image-summary.env -config/image_daily_cron.env -config/imagelogs.env -config/make_request.env -config/pp_daily_test.env -config/sendimagereq.env -config/slack-webhook-preprocessors.env -config/imageup.env -config/gemini.env *.sh docker-compose.override.yml - -# Ignore all preprocessor-specific LLM override env files -preprocessors/**/config/*.env \ No newline at end of file +# Ignore all files in config/ except documentation and example files +config/* +!config/Readme.md +!config/*.example.env \ No newline at end of file diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 509b6e40..1bd9ea15 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -227,12 +227,12 @@ In `docker-compose.yml`, preprocessors that support this list two `env_file` ent env_file: - path: ./config/llm.env required: true - - path: ./preprocessors//config/.env + - path: ./config/.env required: false ``` The global `config/llm.env` is always loaded first; the preprocessor-specific file is loaded second **only if it exists**, and any variable it sets overrides the global value for that preprocessor alone. If the file doesn't exist, the preprocessor simply falls back to the global configuration. No extra setup is required unless you actually want an override. -To set one up, create a `config` folder inside the service (if it does not already exist) and a `.env` file inside the folder. Set `LLM_API_KEY`, `LLM_URL`, and `LLM_MODEL`. Add this path to the `docker-compose.yml` file's `env_file` entry for that service and set the `required` flag to `False`. +To set one up, create a `.env` file within the existing `config/` directory using the naming convention `.env`. Set `LLM_API_KEY`, `LLM_URL`, and `LLM_MODEL`. Add this path to the `docker-compose.yml` file's `env_file` entry for that service (if it does not exist) and set the `required` flag to `False`. **If you override any one of these three, set all three**: they describe a single endpoint together, and partially overriding them will send incorrect credentials to the new endpoint and fail the request. diff --git a/config/Readme.md b/config/Readme.md index 212e190d..5ff1a2d0 100644 --- a/config/Readme.md +++ b/config/Readme.md @@ -57,8 +57,6 @@ LLM_MODEL = [INSERT MODEL NAME] * `LLM_URL` can point at a local model server (e.g. Ollama, vLLM) or a cloud provider that exposes an OpenAI-compatible API (e.g. OpenRouter). -* `LLM_MODEL` must be a model the chosen endpoint supports. See each - preprocessor's own README for any model-specific requirements (e.g. - supported model families for coordinate/output format). +* `LLM_MODEL` must be a model the chosen endpoint supports. -**Using a different model per service:** `llm.env` sets the default LLM endpoint and model for *all* preprocessors that use the shared LLM client. If a specific preprocessor needs to use a different endpoint or model than this default, do not edit this file. Instead, go to that preprocessor's own config folder (e.g. `preprocessors/object-detection-llm/config/`) and read its `Readme.md` for instructions on setting up a preprocessor-specific override. This applies to any service — preprocessor, handler, or otherwise — that may support its own override in the future, not just LLM-based preprocessors. \ No newline at end of file +**Using a different model per service:** `llm.env` sets the default LLM endpoint and model for *all* preprocessors that use the shared LLM client. If a specific preprocessor needs to use a different endpoint or model than this default, do not edit this file. Instead, create a separate `.env` file for that preprocessor override using the naming convention: `.env` within the existing `config/` directory. This applies to any service — preprocessor, handler, or otherwise — that may support its own override in the future, not just LLM-based preprocessors. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 79c78b39..bda8015f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -94,7 +94,7 @@ services: env_file: - path: ./config/maps.env required: true - - path: ./preprocessors/autour/config/autour.env + - path: ./config/autour.env required: false labels: ca.mcgill.a11y.image.preprocessor: 1 @@ -118,7 +118,7 @@ services: env_file: - path: ./config/llm.env required: true - - path: ./preprocessors/content-categoriser/config/content-categoriser.env + - path: ./config/content-categoriser.env required: false environment: - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} @@ -137,7 +137,7 @@ services: env_file: - path: ./config/llm.env required: true - - path: ./preprocessors/graphic-caption/config/graphic-caption.env + - path: ./config/graphic-caption.env required: false environment: - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} @@ -163,7 +163,7 @@ services: env_file: - path: ./config/llm.env required: true - - path: ./preprocessors/text-followup/config/text-followup.env + - path: ./config/text-followup.env required: false object-detection: @@ -205,7 +205,7 @@ services: env_file: - path: ./config/llm.env required: true - - path: ./preprocessors/object-detection-llm/config/object-detection-llm.env + - path: ./config/object-detection-llm.env required: false multistage-diagram-segmentation: @@ -231,7 +231,7 @@ services: env_file: - path: ./config/llm.env required: true - - path: ./preprocessors/multistage-diagram-segmentation/config/multistage-diagram-segmentation.env + - path: ./config/multistage-diagram-segmentation.env required: false object-grouping: @@ -254,7 +254,7 @@ services: env_file: - path: ./config/maps.env required: true - - path: ./preprocessors/openstreetmap/config/openstreetmap.env + - path: ./config/openstreetmap.env required: false labels: ca.mcgill.a11y.image.preprocessor: 3 @@ -523,7 +523,10 @@ services: image: ghcr.io/shared-reality-lab/image-preprocessor-ocr-clouds:${REGISTRY_TAG} restart: "no" env_file: - - ./config/apis-and-selection.env + - path: ./config/apis-and-selection.env + required: true + - path: ./config/ocr.env + required: false labels: ca.mcgill.a11y.image.preprocessor: 4 ca.mcgill.a11y.image.port: 5000 diff --git a/preprocessors/object-detection-llm/config/Readme.md b/preprocessors/object-detection-llm/config/Readme.md deleted file mode 100644 index d9f089ee..00000000 --- a/preprocessors/object-detection-llm/config/Readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# OPTIONAL Preprocessor Config - -If a specific preprocessor needs to use a different LLM endpoint or model than the global default at `config/llm.env` (e.g. running a smaller model for a specific preprocessor), create an override file at: -preprocessors//config/.env - -Set the following fields in the `.env` file: -LLM_API_KEY = [INSERT KEY STRING] -LLM_URL = [INSERT OPENAI-COMPATIBLE ENDPOINT URL] -LLM_MODEL = [INSERT MODEL NAME] - -*Note:* This file is optional. If it doesn't exist, the preprocessor falls back to the global `config/llm.env`. If it does exist, any variable set in it takes priority over the global config for that preprocessor only. - -**Important:** if you override any one of `LLM_API_KEY`, `LLM_URL`, or -`LLM_MODEL`, you must set **all three** in the override file. These three variables are tied to a single endpoint. Partially overriding (e.g. only changing `LLM_URL` but leaving the global `LLM_API_KEY`) will send the wrong credentials to the new endpoint and fail authentication. \ No newline at end of file diff --git a/preprocessors/object-detection-llm/config/__init__.py b/preprocessors/object-detection-llm/config/__init__.py deleted file mode 100644 index b34fa9b4..00000000 --- a/preprocessors/object-detection-llm/config/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# /app/config/__init__.py -# This file marks the config directory as a Python package. From 59f6fe9f1611d0dd5074abdacf639a7c39451423 Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Fri, 21 Aug 2026 14:12:41 -0400 Subject: [PATCH 07/11] fix: updated documentation to refer to .env.example and created the example files --- .gitignore | 2 +- config/Readme.md | 29 ++++++--------------------- config/apis-and-selection.env.example | 5 +++++ config/azure-api.env.example | 2 ++ config/llm.env.example | 12 +++++++++++ config/maps.env.example | 2 ++ 6 files changed, 28 insertions(+), 24 deletions(-) create mode 100644 config/apis-and-selection.env.example create mode 100644 config/azure-api.env.example create mode 100644 config/llm.env.example create mode 100644 config/maps.env.example diff --git a/.gitignore b/.gitignore index fad652f8..5b9d9a29 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ docker-compose.override.yml # Ignore all files in config/ except documentation and example files config/* !config/Readme.md -!config/*.example.env \ No newline at end of file +!config/*.env.example \ No newline at end of file diff --git a/config/Readme.md b/config/Readme.md index 5ff1a2d0..4a6ddec0 100644 --- a/config/Readme.md +++ b/config/Readme.md @@ -11,23 +11,16 @@ This file contains the API key used to call Google Places API. [Here](https://de * [autour preprocessor](https://github.com/Shared-Reality-Lab/IMAGE-server/tree/main/preprocessors/autour) * [openstreetmap preprocessor](https://github.com/Shared-Reality-Lab/IMAGE-server/tree/main/preprocessors/openstreetmap) -Following is the sample format of maps.env file: -``` -GOOGLE_PLACES_KEY = [INSERT KEY STRING] -``` +Check [`maps.env.example`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/config/maps.env.example) for format specifications. ### apis-and-selection.env Entries in this env file are required by the following preprocessors: * [ocr-clouds-preprocessor](https://github.com/Shared-Reality-Lab/IMAGE-server/tree/main/preprocessors/ocr) -Following is the sample format of apis-and-selection.env file: +Check [`apis-and-selection.env.example`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/config/apis-and-selection.env.example) for format specifications. + +#### Note: -``` -AZURE_API_KEY = [INSERT KEY STRING] -FREEOCR_API_KEY = [INSERT KEY STRING] -GOOGLE_APPLICATION_CREDENTIALS = [INSERT KEY FILE PATH AS STRING] -CLOUD_SERVICE = [INSERT OPTION STRING (see options below)] -``` * `CLOUD_SERVICE` determines the desired cloud service to be used. Its possible values are: * `AZURE_OCR` (for [Microsoft Azure OCR API](https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-2/operations/56f91f2e778daf14a499f20d)) * `AZURE_READ` (for [Microsoft Azure Read API](https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/how-to/call-read-api)) @@ -42,21 +35,11 @@ CLOUD_SERVICE = [INSERT OPTION STRING (see options below)] This env file is required by the following preprocessors: * [graphic tagger](https://github.com/Shared-Reality-Lab/IMAGE-server/tree/main/preprocessors/graphic-tagger) -Following is the sample format of azure-api.env file: -``` -AZURE_API_KEY = [INSERT KEY STRING] -``` +Check [`azure-api.env.example`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/config/azure-api.env.example) for format specifications. ### llm.env Entries in this env file are required by preprocessors that use an LLM via the shared LLM client ([`utils/llm/client.py`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/utils/llm/client.py)). -Following is the sample format of llm.env file: -LLM_API_KEY = [INSERT KEY STRING] -LLM_URL = [INSERT OPENAI-COMPATIBLE ENDPOINT URL] -LLM_MODEL = [INSERT MODEL NAME] - -* `LLM_URL` can point at a local model server (e.g. Ollama, vLLM) or a - cloud provider that exposes an OpenAI-compatible API (e.g. OpenRouter). -* `LLM_MODEL` must be a model the chosen endpoint supports. +Check [`llm.env.example`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/config/llm.env.example) for format specifications. **Using a different model per service:** `llm.env` sets the default LLM endpoint and model for *all* preprocessors that use the shared LLM client. If a specific preprocessor needs to use a different endpoint or model than this default, do not edit this file. Instead, create a separate `.env` file for that preprocessor override using the naming convention: `.env` within the existing `config/` directory. This applies to any service — preprocessor, handler, or otherwise — that may support its own override in the future, not just LLM-based preprocessors. \ No newline at end of file diff --git a/config/apis-and-selection.env.example b/config/apis-and-selection.env.example new file mode 100644 index 00000000..62ce5b08 --- /dev/null +++ b/config/apis-and-selection.env.example @@ -0,0 +1,5 @@ +# Following is the sample format of apis-and-selection.env file: +AZURE_API_KEY = [INSERT KEY STRING] +FREEOCR_API_KEY = [INSERT KEY STRING] +GOOGLE_APPLICATION_CREDENTIALS = [INSERT KEY FILE PATH AS STRING] +CLOUD_SERVICE = [INSERT OPTION STRING (see options below)] \ No newline at end of file diff --git a/config/azure-api.env.example b/config/azure-api.env.example new file mode 100644 index 00000000..736fce7a --- /dev/null +++ b/config/azure-api.env.example @@ -0,0 +1,2 @@ +# Following is the sample format of azure-api.env file: +AZURE_API_KEY = [INSERT KEY STRING] \ No newline at end of file diff --git a/config/llm.env.example b/config/llm.env.example new file mode 100644 index 00000000..88fa7eda --- /dev/null +++ b/config/llm.env.example @@ -0,0 +1,12 @@ +# Sample format of llm.env file: +LLM_API_KEY = [INSERT KEY STRING] +LLM_URL = [INSERT OPENAI-COMPATIBLE ENDPOINT URL] +LLM_MODEL = [INSERT MODEL NAME] + +# Note: + +# LLM_URL can point at a local model server (e.g. Ollama, vLLM) +# or a cloud provider that exposes an OpenAI-compatible API +# (e.g. OpenRouter). + +# LLM_MODEL must be a model the chosen endpoint supports. \ No newline at end of file diff --git a/config/maps.env.example b/config/maps.env.example new file mode 100644 index 00000000..b993fba7 --- /dev/null +++ b/config/maps.env.example @@ -0,0 +1,2 @@ +# Following is the sample format of maps.env file: +GOOGLE_PLACES_KEY = [INSERT KEY STRING] \ No newline at end of file From b771c6a7688aabec14dd17e9f018462e6424ee2c Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Sun, 23 Aug 2026 15:53:49 -0400 Subject: [PATCH 08/11] fix: updated documentation --- DEPLOYMENT.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 1bd9ea15..46a84b73 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -240,6 +240,8 @@ Preprocessors currently supporting this override pattern (check `docker-compose.yml` for the current list, as this may grow): `autour-preprocessor`, `content-categoriser`, `graphic-caption`, `text-followup`, `object-detection-llm`, `multistage-diagram-segmentation`. +The same is applicable for any of the preprocessors. Check the preprocessor-specific `.env.example` file for setting env variables. + ## GPU Notes: Some containers that require GPU (and don't use a cloud endpoint or the LLM) include espnet-tts, text-followup, semantic-segmentation,object-detection, action-recognition, and so on. You can see which ones need GPU directly in docker-compose.yml since they include a `deploy.resources.reservations.devices` stanza with `driver: nvidia`. From d67bfbadecedea65880981febd5118035d297d4e Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Mon, 31 Aug 2026 22:27:52 -0400 Subject: [PATCH 09/11] update: removed express-common and moved variables to docker-compose --- DEPLOYMENT.md | 4 +-- config/Readme.md | 6 ++-- ...tion.env.example => cloud-ocr.env.example} | 5 ++- config/express-common.env | 1 - docker-compose.yml | 33 +++++++------------ preprocessors/ocr/README.md | 10 ++---- 6 files changed, 22 insertions(+), 37 deletions(-) rename config/{apis-and-selection.env.example => cloud-ocr.env.example} (52%) delete mode 100644 config/express-common.env diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 46a84b73..ea7c5a38 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -103,11 +103,11 @@ Docker Compose uses environment files to configure how services run. In IMAGE, y b) Component-specific envs: These configure runtime services (preprocessors, handlers, or standalone services) which are loaded by containers at runtime. They often hold API keys, model names, or URLs that you don't want to check into git. Filenames are specified in docker-compose. For example, ensure the following files exist in the config/ folder and are populated with appropriate credentials: - `apis-and-selection.env, azure-api.env, llm.env, maps.env` + `cloud-ocr.env, azure-api.env, llm.env, maps.env` If a service is not in use, simply create an empty file with the same name to avoid startup errors. Here is a command to create them all: - `touch config/{maps.env,express-common.env,llm.env,azure-api.env}` + `touch config/{maps.env,llm.env,azure-api.env}` TIP: once completed, these files include credentials that should not be committed in Git! diff --git a/config/Readme.md b/config/Readme.md index 4a6ddec0..134f2b37 100644 --- a/config/Readme.md +++ b/config/Readme.md @@ -13,19 +13,21 @@ This file contains the API key used to call Google Places API. [Here](https://de Check [`maps.env.example`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/config/maps.env.example) for format specifications. -### apis-and-selection.env +### cloud-ocr.env Entries in this env file are required by the following preprocessors: * [ocr-clouds-preprocessor](https://github.com/Shared-Reality-Lab/IMAGE-server/tree/main/preprocessors/ocr) -Check [`apis-and-selection.env.example`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/config/apis-and-selection.env.example) for format specifications. +Check [`cloud-ocr.env.example`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/config/cloud-ocr.env.example) for format specifications. #### Note: +`CLOUD_SERVICE` is set within the [docker-compose](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/docker-compose.yml) file. * `CLOUD_SERVICE` determines the desired cloud service to be used. Its possible values are: * `AZURE_OCR` (for [Microsoft Azure OCR API](https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-2/operations/56f91f2e778daf14a499f20d)) * `AZURE_READ` (for [Microsoft Azure Read API](https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/how-to/call-read-api)) * `GOOGLE_VISION` (for [Google Cloud Vision API](https://cloud.google.com/vision/docs/ocr)) * `FREE_OCR` (for [Free OCR API](https://ocr.space/OCRAPI)) + * `AZURE_API_KEY` is found in your [Azure portal](https://portal.azure.com) * `FREEOCR_API_KEY` can be obtained at [OCR API portal](https://ocr.space/ocrapi) * `GOOGLE_APPLICATION_CREDENTIALS` contains path to credentials file. Refer [documentation](https://cloud.google.com/docs/authentication/application-default-credentials#GAC) for details. diff --git a/config/apis-and-selection.env.example b/config/cloud-ocr.env.example similarity index 52% rename from config/apis-and-selection.env.example rename to config/cloud-ocr.env.example index 62ce5b08..e12d815d 100644 --- a/config/apis-and-selection.env.example +++ b/config/cloud-ocr.env.example @@ -1,5 +1,4 @@ -# Following is the sample format of apis-and-selection.env file: +# Following is the sample format of cloud-ocr.env file: AZURE_API_KEY = [INSERT KEY STRING] FREEOCR_API_KEY = [INSERT KEY STRING] -GOOGLE_APPLICATION_CREDENTIALS = [INSERT KEY FILE PATH AS STRING] -CLOUD_SERVICE = [INSERT OPTION STRING (see options below)] \ No newline at end of file +GOOGLE_APPLICATION_CREDENTIALS = [INSERT KEY FILE PATH AS STRING] \ No newline at end of file diff --git a/config/express-common.env b/config/express-common.env deleted file mode 100644 index 2d18baed..00000000 --- a/config/express-common.env +++ /dev/null @@ -1 +0,0 @@ -MAX_BODY=10mb diff --git a/docker-compose.yml b/docker-compose.yml index bda8015f..bdf7bf12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,13 +5,12 @@ services: image: ghcr.io/shared-reality-lab/image-orchestrator:${REGISTRY_TAG} restart: "no" environment: + - MAX_BODY=10mb - PARALLEL_PREPROCESSORS=ON - STORE_IMAGE_DATA=ON - MEMCACHE_SERVERS=memcached:11211 - PREPROCESSOR_TIMEOUT=90000 - CACHE_OVERRIDE=/var/cache/IMAGE - env_file: - - ./config/express-common.env group_add: # This should be set in an environment variable or .env - ${DOCKER_GID} @@ -315,8 +314,6 @@ services: profiles: [production, test, default] image: ghcr.io/shared-reality-lab/image-handler-photo-audio:${REGISTRY_TAG} restart: "no" - env_file: - - ./config/express-common.env labels: ca.mcgill.a11y.image.handler: enable ca.mcgill.a11y.image.required_dependencies: "semantic-segmentation,object-grouping,object-detection,graphic-caption" @@ -324,14 +321,13 @@ services: volumes: - sc-store:/tmp/sc-store environment: + - MAX_BODY=10mb - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} autour-handler: profiles: [production, test, default] image: ghcr.io/shared-reality-lab/image-handler-autour:${REGISTRY_TAG} restart: "no" - env_file: - - ./config/express-common.env labels: ca.mcgill.a11y.image.handler: enable ca.mcgill.a11y.image.required_dependencies: "autour-preprocessor" @@ -339,14 +335,13 @@ services: volumes: - sc-store:/tmp/sc-store environment: + - MAX_BODY=10mb - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} photo-audio-haptics-handler: profiles: [production, test, default] image: ghcr.io/shared-reality-lab/image-handler-photo-audio-haptics:${REGISTRY_TAG} restart: "no" - env_file: - - ./config/express-common.env labels: ca.mcgill.a11y.image.handler: enable ca.mcgill.a11y.image.required_dependencies: "semantic-segmentation,object-grouping,object-detection" @@ -354,14 +349,13 @@ services: volumes: - sc-store:/tmp/sc-store environment: + - MAX_BODY=10mb - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} high-charts-handler: profiles: [production, test, default] image: ghcr.io/shared-reality-lab/image-handler-high-charts:${REGISTRY_TAG} restart: "no" - env_file: - - ./config/express-common.env labels: ca.mcgill.a11y.image.handler: enable ca.mcgill.a11y.image.required_dependencies: "" @@ -369,6 +363,7 @@ services: volumes: - sc-store:/tmp/sc-store environment: + - MAX_BODY=10mb - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} svg-od-handler: @@ -428,14 +423,13 @@ services: profiles: [production, test, default] image: ghcr.io/shared-reality-lab/image-preprocessor-nominatim:${REGISTRY_TAG} restart: "no" - env_file: - - ./config/express-common.env labels: ca.mcgill.a11y.image.preprocessor: 2 ca.mcgill.a11y.image.cacheTimeout: 3600 ca.mcgill.a11y.image.required_dependencies: "" ca.mcgill.a11y.image.optional_dependencies: "" environment: + - MAX_BODY=10mb - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} - NOMINATIM_SERVER=https://pegasus.cim.mcgill.ca/nominatim # Optional fallback if Pegasus is unreachable @@ -494,9 +488,8 @@ services: profiles: [test, default] image: ghcr.io/shared-reality-lab/image-handler-motd:${REGISTRY_TAG} restart: "no" - env_file: - - ./config/express-common.env environment: + - MAX_BODY=10mb - MOTD=Hello, world! - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} labels: @@ -508,13 +501,12 @@ services: profiles: [test, default] image: ghcr.io/shared-reality-lab/image-handler-hello-haptics:${REGISTRY_TAG} restart: "no" - env_file: - - ./config/express-common.env labels: ca.mcgill.a11y.image.handler: enable ca.mcgill.a11y.image.required_dependencies: "object-detection-llm" ca.mcgill.a11y.image.optional_dependencies: "" environment: + - MAX_BODY=10mb - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} # For environment setup refer to https://github.com/Shared-Reality-Lab/IMAGE-server/tree/main/preprocessors/ocr @@ -523,10 +515,8 @@ services: image: ghcr.io/shared-reality-lab/image-preprocessor-ocr-clouds:${REGISTRY_TAG} restart: "no" env_file: - - path: ./config/apis-and-selection.env + - path: ./config/cloud-ocr.env required: true - - path: ./config/ocr.env - required: false labels: ca.mcgill.a11y.image.preprocessor: 4 ca.mcgill.a11y.image.port: 5000 @@ -534,6 +524,7 @@ services: ca.mcgill.a11y.image.required_dependencies: "" ca.mcgill.a11y.image.optional_dependencies: "object-detection-llm" environment: + - CLOUD_SERVICE="AZURE_READ" - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} object-depth-calculator: @@ -571,14 +562,13 @@ services: ca.mcgill.a11y.image.required_dependencies: "ocr-clouds-preprocessor,object-detection" ca.mcgill.a11y.image.optional_dependencies: "" environment: + - CLOUD_SERVICE="AZURE_READ" - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} osm-streets-handler: profiles: [test, default] image: ghcr.io/shared-reality-lab/image-handler-osm-streets:${REGISTRY_TAG} restart: "no" - env_file: - - ./config/express-common.env depends_on: - supercollider - espnet-tts @@ -589,6 +579,7 @@ services: volumes: - sc-store:/tmp/sc-store environment: + - MAX_BODY=10mb - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} svg-open-street-map-handler: diff --git a/preprocessors/ocr/README.md b/preprocessors/ocr/README.md index a65fccdd..04f91e42 100644 --- a/preprocessors/ocr/README.md +++ b/preprocessors/ocr/README.md @@ -23,16 +23,10 @@ The desired cloud service is determined by an environment variable called `CLOUD The path to an environment file containing this variable should be provided in the `docker-compose.yml`, right in the `env_file` field of the `ocr-clouds-preprocessor` service. ## Environment setup -The environment file (apis-and-selection.env) should contain the desired cloud service to be used, and the corresponding api keys. +The environment file (cloud-ocr.env) should contain the desired cloud service to be used, and the corresponding api keys. -Following is the sample format of apis-and-selection.env file: +Check [`cloud-ocr.env.example`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/config/cloud-ocr.env.example) for format specifications. -``` -AZURE_API_KEY = [INSERT KEY STRING] -FREEOCR_API_KEY = [INSERT KEY STRING] -GOOGLE_APPLICATION_CREDENTIALS = [INSERT KEY FILE PATH AS STRING] -CLOUD_SERVICE = [INSERT OPTION STRING (see options below)] -``` * `CLOUD_SERVICE` determines the desired cloud service to be used. Its possible values are: * `AZURE_OCR` (for [Microsoft Azure OCR API](https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-2/operations/56f91f2e778daf14a499f20d)) * `AZURE_READ` (for [Microsoft Azure Read API](https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/how-to/call-read-api)) From 6614366ac8be387f08d986f0081c955cf53e75a0 Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Tue, 1 Sep 2026 11:54:59 -0400 Subject: [PATCH 10/11] update: gitignore, documentation clarity --- .gitignore | 6 ++---- DEPLOYMENT.md | 4 ++-- docker-compose.yml | 3 +-- orchestrator/README.md | 10 +++------- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 5b9d9a29..6df3ea30 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,5 @@ __pycache__/ *.swp *.sh docker-compose.override.yml -# Ignore all files in config/ except documentation and example files -config/* -!config/Readme.md -!config/*.env.example \ No newline at end of file +# Ignore all .env files in config/ +config/**/*.env \ No newline at end of file diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index ea7c5a38..b8ad2676 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -238,9 +238,9 @@ To set one up, create a `.env` file within the existing `config/` directory usin Preprocessors currently supporting this override pattern (check `docker-compose.yml` for the current list, as this may grow): -`autour-preprocessor`, `content-categoriser`, `graphic-caption`, `text-followup`, `object-detection-llm`, `multistage-diagram-segmentation`. +`content-categoriser`, `graphic-caption`, `text-followup`, `object-detection-llm`, `multistage-diagram-segmentation`. -The same is applicable for any of the preprocessors. Check the preprocessor-specific `.env.example` file for setting env variables. +The override functionality is applicable for any of the preprocessors. Check the preprocessor-specific `.env.example` file for setting env variables. ## GPU Notes: Some containers that require GPU (and don't use a cloud endpoint or the LLM) include espnet-tts, text-followup, semantic-segmentation,object-detection, action-recognition, and so on. You can see which ones need GPU directly in docker-compose.yml since they include a `deploy.resources.reservations.devices` stanza with `driver: nvidia`. diff --git a/docker-compose.yml b/docker-compose.yml index bdf7bf12..74248209 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -524,7 +524,7 @@ services: ca.mcgill.a11y.image.required_dependencies: "" ca.mcgill.a11y.image.optional_dependencies: "object-detection-llm" environment: - - CLOUD_SERVICE="AZURE_READ" + - CLOUD_SERVICE=AZURE_READ - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} object-depth-calculator: @@ -562,7 +562,6 @@ services: ca.mcgill.a11y.image.required_dependencies: "ocr-clouds-preprocessor,object-detection" ca.mcgill.a11y.image.optional_dependencies: "" environment: - - CLOUD_SERVICE="AZURE_READ" - PII_LOGGING_ENABLED=${PII_LOGGING_ENABLED} osm-streets-handler: diff --git a/orchestrator/README.md b/orchestrator/README.md index 321826e4..dc76da2d 100644 --- a/orchestrator/README.md +++ b/orchestrator/README.md @@ -58,9 +58,8 @@ Here is a snippet of the service from our sample `docker-compose.yml`: ```yaml orchestrator: image: ghcr.io/shared-reality-lab/image-orchestrator:unstable - env_file: - - ./config/express-common.env environment: + - MAX_BODY=10mb - STORE_IMAGE_DATA=ON - PARALLEL_PREPROCESORS=ON group_add: @@ -70,12 +69,9 @@ orchestrator: - user-logs:/var/log/IMAGE ``` -The environment file loaded at `./config/express-common.env` increases the maximum body size allowed by Express. -If this is not included, larger requests (for example, those including larger graphics) will be rejected by the orchestrator -and not be handled by IMAGE. For consistency, this value should be used in all containers using Express. +The environment variable section sets the options for the orchestrator. The `MAX_BODY` variable increases the maximum body size allowed by Express. If this is not included, larger requests (for example, those including larger graphics) will be rejected by the orchestrator and not be handled by IMAGE. For consistency, this value should be used in all containers using Express. -The environment variable section sets the options for the orchestrator. These may be set another way, or the section can just -be omitted if the default behavior is desired. +Other variables may be set another way, or just omitted if the default behavior is desired. The orchestrator runs as a non-root user. As such, the container must be run with permissions of the `docker` group on the host in order to access the socket. The socket must also be mounted into the container (the bind mount `/var/run/docker.sock:/var/run/docker.sock:ro`). From 3cc9351e499649db397db68d75802a63a267e1d6 Mon Sep 17 00:00:00 2001 From: Mansi7402 <91747966+Mansi7402@users.noreply.github.com> Date: Tue, 1 Sep 2026 14:26:21 -0400 Subject: [PATCH 11/11] clarifying documentation --- DEPLOYMENT.md | 2 +- preprocessors/ocr/README.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index b8ad2676..b5cd4da3 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -240,7 +240,7 @@ Preprocessors currently supporting this override pattern (check `docker-compose.yml` for the current list, as this may grow): `content-categoriser`, `graphic-caption`, `text-followup`, `object-detection-llm`, `multistage-diagram-segmentation`. -The override functionality is applicable for any of the preprocessors. Check the preprocessor-specific `.env.example` file for setting env variables. +The same layered `env_file` override functionality can be used for other service configurations as well. ## GPU Notes: Some containers that require GPU (and don't use a cloud endpoint or the LLM) include espnet-tts, text-followup, semantic-segmentation,object-detection, action-recognition, and so on. You can see which ones need GPU directly in docker-compose.yml since they include a `deploy.resources.reservations.devices` stanza with `driver: nvidia`. diff --git a/preprocessors/ocr/README.md b/preprocessors/ocr/README.md index 04f91e42..df2bec9d 100644 --- a/preprocessors/ocr/README.md +++ b/preprocessors/ocr/README.md @@ -22,8 +22,12 @@ The desired cloud service is determined by an environment variable called `CLOUD * `CLOUD_SERVICE="FREE_OCR"` The path to an environment file containing this variable should be provided in the `docker-compose.yml`, right in the `env_file` field of the `ocr-clouds-preprocessor` service. + ## Environment setup -The environment file (cloud-ocr.env) should contain the desired cloud service to be used, and the corresponding api keys. + +The [docker-compose](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/docker-compose.yml) file should set the desired cloud service to be used under its environment variables. + +The environment file (cloud-ocr.env) should contain the corresponding api keys for the selected service. Check [`cloud-ocr.env.example`](https://github.com/Shared-Reality-Lab/IMAGE-server/blob/main/config/cloud-ocr.env.example) for format specifications.