{"record":{"id":"bb93c75a4a2ebdbf","repo":"docling-project/docling","slug":"nemotron-ocr-is-only-supported-on-x86-64-machines","errorCode":null,"errorMessage":"Nemotron OCR is only supported on x86_64 machines.","messagePattern":"Nemotron OCR is only supported on x86_64 machines\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"docling/models/stages/ocr/nemotron_ocr_model.py","lineNumber":155,"sourceCode":"                    'via `pip install \"docling[feat-ocr-nemotron]\"` on Linux x86_64 with '\n                    \"Python 3.12 and CUDA 13.x.\"\n                ) from exc\n\n            # Resolve the request language\n            language = resolve_nemotronocr_language(options.lang)\n\n            # Initialize the model\n            model_dir = self._resolve_model_dir(language, artifacts_path=artifacts_path)\n\n            self.reader = NemotronOCRV2(\n                model_dir=None if model_dir is None else str(model_dir),\n                lang=language,\n            )\n\n    @staticmethod\n    def _fail_runtime(message: str) -> None:\n        _log.error(message)\n        raise RuntimeError(message)\n\n    @classmethod\n    def validate_runtime(cls, accelerator_options: AcceleratorOptions) -> None:\n        if sys.platform != \"linux\":\n            cls._fail_runtime(\"Nemotron OCR is only supported on Linux.\")\n\n        if platform.machine() != \"x86_64\":\n            cls._fail_runtime(\"Nemotron OCR is only supported on x86_64 machines.\")\n\n        if sys.version_info[:2] != (3, 12):\n            cls._fail_runtime(\"Nemotron OCR requires Python 3.12.\")\n\n        requested_device = decide_device(accelerator_options.device)\n        if not requested_device.startswith(\"cuda\"):\n            cls._fail_runtime(\n                \"Nemotron OCR requires a CUDA accelerator. Set \"\n                \"`pipeline_options.accelerator_options.device` to CUDA or AUTO on a \"\n                \"CUDA-enabled machine.\"","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/models/stages/ocr/nemotron_ocr_model.py#L137-L173","documentation":"validate_runtime checks platform.machine() and requires 'x86_64'. On ARM machines (Apple Silicon, AWS Graviton, ARM devboards) the Nemotron OCR stage raises RuntimeError immediately, since upstream wheels/CUDA 13.x support only x86_64. The check runs before model download or inference.","triggerScenarios":"Enabling NemotronOcrOptions on aarch64/ARM64 hosts, including Apple Silicon Macs (even inside a Linux VM on ARM) and ARM cloud instances.","commonSituations":"M1/M2/M3 Macs; Graviton-based EC2/CLOUD instances; Raspberry Pi-class boards; ARM CI runners.","solutions":["Use an x86_64 Linux environment — an x86 container/host or an AMD64 cloud instance with CUDA 13.x and Python 3.12.","On ARM, choose a portable OCR engine instead (Tesseract, EasyOCR with CPU, RapidOCR onnxruntime).","Check `python -c \"import platform; print(platform.machine())\"` before selecting the engine."],"exampleFix":"# before\npipeline_options.ocr_options = NemotronOcrOptions()  # on aarch64 -> RuntimeError\n\n# after\nimport platform\nif platform.machine() == \"x86_64\" and sys.platform == \"linux\":\n    pipeline_options.ocr_options = NemotronOcrOptions()\nelse:\n    pipeline_options.ocr_options = RapidOcrOptions()","handlingStrategy":"validation","validationCode":"import platform, sys\n\ndef nemotron_supported() -> bool:\n    return sys.platform == \"linux\" and platform.machine() == \"x86_64\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check platform.machine() in your engine-selection logic, not just the OS.","Beware ARM Linux containers on Apple Silicon — they pass the Linux check but fail x86_64.","Document the host requirements in your deployment config so provisioning matches them."],"tags":["nemotron","ocr","platform","arm","x86"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}