Skip to content

fix(docker): add NLP_CONF_FILE to runtime environment in docker-compose-transformers.yml#2049

Open
sriram687 wants to merge 1 commit into
microsoft:mainfrom
sriram687:fix/transformers-compose-runtime-nlp-conf
Open

fix(docker): add NLP_CONF_FILE to runtime environment in docker-compose-transformers.yml#2049
sriram687 wants to merge 1 commit into
microsoft:mainfrom
sriram687:fix/transformers-compose-runtime-nlp-conf

Conversation

@sriram687
Copy link
Copy Markdown

Summary

docker-compose-transformers.yml passes NLP_CONF_FILE only as a Docker
build-time ARG but omits it from the container's runtime environment: block.

Since app.py reads this value via os.environ.get("NLP_CONF_FILE") at
startup, the build ARG alone is not sufficient to guarantee the correct
NLP engine config is loaded at runtime.

Change

     environment:
       - PORT=5001
+      - NLP_CONF_FILE=presidio_analyzer/conf/transformers.yaml

Why this matters

  • app.py reads NLP_CONF_FILE via os.environ.get() at runtime
  • Without this, the env var is absent in override/direct-run scenarios
  • Makes config explicit, overridable, without rebuilding the image

Fixes

Fixes #2048

Copilot AI review requested due to automatic review settings May 31, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] docker-compose-transformers.yml: NLP_CONF_FILE set as build ARG but missing from runtime environment

1 participant