Skip to content

DOCLING_SERVE_ALLOW_EXTERNAL_PLUGINS env var doesn't work #325

Description

@jorge-garcia-le

Good day. I'm trying to get my plugin loaded into a docling-serve image. I set the environment variable DOCLING_SERVE_ALLOW_EXTERNAL_PLUGINS to true as indicated in the documentation, but the app does not load it as a valid option for processing.

This is my docker_compose.yaml (with some added commands for sanity checks):

services:
  docling-serve:
    image: ghcr.io/docling-project/docling-serve-cu128:main
    container_name: docling-serve 
    entrypoint: bash
    user: "0:0"
    command: >
      -c "mkdir /app && 
          cp -r /mnt/docling-vllm-plugin /app/docling-vllm-plugin &&
          pip install /app/docling-vllm-plugin &&
          docling --show-external-plugins &&
          env | grep DOCLING &&
          docling-serve run"
    ports:
      - "5001:5001"
    environment:
      - DOCLING_SERVE_ENABLE_UI=true
      - DOCLING_SERVE_ALLOW_EXTERNAL_PLUGINS=true
      - NVIDIA_VISIBLE_DEVICES=0
    volumes:
      - ../docling-vllm-plugin:/mnt/docling-vllm-plugin:ro
    runtime: nvidia
    restart: unless-stopped

After the installation of my plugin package, here's the output:

docling-serve  |            Available OCR engines            
docling-serve  | ┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
docling-serve  | ┃        Name ┃ Plugin      ┃ Package      ┃
docling-serve  | ┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
docling-serve  | │ lazarus-ocr │ lazarus-ocr │ docling_vllm │
docling-serve  | └─────────────┴─────────────┴──────────────┘
docling-serve  | DOCLING_SERVE_ALLOW_EXTERNAL_PLUGINS=true
docling-serve  | DOCLING_SERVE_ARTIFACTS_PATH=/opt/app-root/src/.cache/docling/models
docling-serve  | DOCLING_SERVE_ENABLE_UI=true
docling-serve  | Starting production server 🚀
docling-serve  | 
docling-serve  | Server started at http://0.0.0.0:5001
docling-serve  | Documentation at http://0.0.0.0:5001/docs
docling-serve  | Scalar docs at http://0.0.0.0:5001/scalar
docling-serve  | UI at http://0.0.0.0:5001/ui
docling-serve  | 
docling-serve  | Logs:
docling-serve  | INFO:     Started server process [1]
docling-serve  | INFO:     Waiting for application startup.
docling-serve  | WARNING:docling.models.factories.base_factory:The plugin lazarus-ocr will not be loaded because Docling is being executed with allow_external_plugins=false.
docling-serve  | WARNING:docling.models.factories.base_factory:The plugin lazarus-ocr will not be loaded because Docling is being executed with allow_external_plugins=false.
docling-serve  | INFO:     Application startup complete.
docling-serve  | INFO:     Uvicorn running on http://0.0.0.0:5001 (Press CTRL+C to quit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions