Skip to content

Linux installation does not export location of libflexmlrt.so in LD_LIBRARY_PATH #386

Description

@Swiftloke

You would expect the venv/bin/activate script to set this when initializing the library paths, but it fails to do so:

LD_LIBRARY_PATH="${SITE_PACKAGES}/flexml/flexml_extras/lib:${SITE_PACKAGES}/onnxruntime/capi:${SITE_PACKAGES}/voe/lib:${LD_LIBRARY_PATH}"

Oops, it's not in any of those:

~/ryzenai$ find|grep libflexmlrt.so
./venv/lib/python3.12/site-packages/flexmlrt/lib/libflexmlrt.so
./venv/deployment/lib/libflexmlrt.so
./venv/onnxruntime/lib/libflexmlrt.so

Which causes the OCR example to fail, unless you add that path yourself:

onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Exception during initialization: ERROR: Failed to create Model for /home/xyz/RyzenAI-SW/CNN-examples/Nemotron-OCR-V2/./cache/modelcachekey_nvidia-nemotron-ocr-v2-recognizer-english_1x128x8x32_bf16/vaiml_par_0, Reason: ERROR: Cannot find libflexmlrt.so in your conda environment . Please check if flexmlrt package is installed properly.

Metadata

Metadata

Assignees

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