Skip to main content
The Limina container supports a number of environment variables. The environment variables can be set in the Docker run command as follows:
Docker Command
docker run --rm -e <ENVIRONMENT_VARIABLE1>=<VALUE> -e <ENVIRONMENT_VARIABLE2>=<VALUE> -p 8080:8080 -it deid:<version number>

Supported Environment Variables

Variable NameDescription
PAI_ACCURACY_MODESControls which entity detection models are loaded at container start. By default, the container loads all models. Setting this environment variable allows for faster container startup and a lower initial memory footprint. A request specifying an accuracy mode that wasn’t loaded will return an error. Allowed values are high, standard_high, standard, high_multilingual, standard_high_multilingual, standard_multilingual. This variable also supports a comma-separated list of values to load multiple models, e.g., PAI_ACCURACY_MODES=high,standard,standard_high. The automatic accuracy settings are not supported in this variable.
PAI_ALLOW_LISTAllows for the allow list to be set globally, instead of passing into each POST request. An example could be PAI_ALLOW_LIST='["John","Grace"]'. Please see Processing Text
PAI_DISABLE_GPU_CHECKWhen defined and set to any value, the startup GPU check is disabled. This variable is only applicable to the GPU container and allows the GPU container to run in fallback CPU mode
PAI_DISABLE_RAM_CHECKWhen defined and set to any value, the sufficient RAM check performed at container startup is disabled. Please note that Limina cannot guarantee container stability if this is switched off
PAI_ENABLED_ENTITIESAllows for the enabled classes to be set globally, instead of passing it into each POST request. An example could be PAI_ENABLED_ENTITIES="NAME" or PAI_ENABLED_ENTITIES="NAME,AGE,ORGANIZATION". A command sample is located at the bottom. Please see also Processing Text
PAI_DISABLED_ENTITIESAllows for the disabled classes to be set globally, instead of passing it into each POST request. An example could be PAI_DISABLED_ENTITIES="ORGANIZATION" or PAI_DISABLED_ENTITIES="AGE,LOCATION,ORGANIZATION". A command sample is located at the bottom. Please see also Processing Text
PAI_ENABLE_AUDIOWhen defined and set to any value, the container loads the functionality to process audio files. This is off by default to save startup time and RAM
PAI_ENABLE_PII_COUNT_METERINGWhen defined and set to any value, Aggregated entity detection counts are sent to logstash and the Limina community portal for reporting and visualization inside the dashboard. Note that feature is off by default
PAI_LOG_LEVELControls the verbosity of the container logging output. Allowed values are info, warning or error. Default is info
PAI_MARKER_FORMATAllows for the redaction marker format to be set globally, instead of passing into each POST request. Please see Processing Text
PAI_OUTPUT_FILE_DIRThe directory where /process/files/uri will write processed files to. Note that this does not need to be specified for /process/files/base64
PAI_PROJECT_IDSets a default project_id that will be used if a request doesn’t contain one. Please see Processing Text
PAI_SYNTHETIC_PII_ACCURACY_MODESSame as PAI_ACCURACY_MODES, except for synthetic entity generation models. This variable also supports a comma-separated list of values to load multiple models, e.g., PAI_SYNTHETIC_PII_ACCURACY_MODES=standard,standard_multilingual. Unlike PAI_ACCURACY_MODES, this environment variable can be set empty via PAI_SYNTHETIC_PII_ACCURACY_MODES= to disable synthetic entity generation
PAI_ENABLE_REPORTINGEnables reporting to a Logstash server
LOGSTASH_HOSTThe Logstash server’s host info
LOGSTASH_PORTThe port of the Logstash server
LOGSTASH_MONITORING_PORTThe monitoring API port of the Logstash server
LOGSTASH_TTLSets the time to live value (in seconds) of the data queued for Logstash. Data will be lost if the queued data is not sent successfully before the ttl value.
PAI_REPORT_ENTITY_COUNTEnables entity counts (per piece of text deidentified) to be added to reporting
PAI_MAX_IMAGE_PIXELSConfigures the max allowed pixels in the images processed. Default value is 178956970
PAI_MAX_FILE_SIZEConfigures the max allowed file size in bytes. File size check occurs before redaction and produces an error message if it exceeds the value specified. i.e. 2000000
PAI_WS_LINK_BATCHEnables context retention in the websocket endpoint. Default is true
PAI_WS_CONTEXT_SIZESets the context window size (number of previous messages retained in context). Default is 50
PAI_ENABLE_PDF_TEXT_LAYERThis environment variable sets the default behaviour for whether a text layer is included in generated PDF files. When set to true, the application will include a text layer in the PDFs, allowing for text selection, search, and accessibility features. When set to false the text layer will be disabled, resulting in marginally smaller file sizes and faster processing. Note that this option is ignored if the pdf_options.enable_pdf_text_layer POST parameter is set in requests to the /process/files/uri and /process/files/base64 endpoints. Default value is true.
PAI_OCR_SYSTEMSets the Optical Character Recognition (OCR) system for processing documents and images. Default is paddleocr
To change the port used by the container, please set the host port as per the command below:
Docker Command
docker run --rm -v "full path to license.json":/app/license/license.json \
-p <host port>:8080 -it crprivateaiprod.azurecr.io/deid:<version>
To use PAI_ENABLED_ENTITIES to redact only for NAME and ORGANIZATION, the command will look like:
Docker Command
docker run --rm -v "full path to license.json":/app/license/license.json \
-e PAI_ENABLED_ENTITIES="NAME,ORGANIZATION"
-p <host port>:8080 -it crprivateaiprod.azurecr.io/deid:<version>
To use PAI_DISABLED_ENTITIES to redact all except ORGANIZATION, the command will look like:
Docker Command
docker run --rm -v "full path to license.json":/app/license/license.json \
-e PAI_DISABLED_ENTITIES="ORGANIZATION"
-p <host port>:8080 -it crprivateaiprod.azurecr.io/deid:<version>
Note: If setting entities both in ENABLE and DISABLE, only ENABLE takes effect. If an entity is duplicated both in ENABLE and DISABLE and ENABLE has no other entity set, the request will fail as 400 Bad Request.