File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363
6464You will need [ Rust] ( https://www.rust-lang.org/tools/install ) for compilation to succeed.
6565
66- ### Precompiled NIFs
67-
68- If you are packaging Ortex with a precompiled NIF, set ` ORTEX_SKIP_COMPILE=1 ` during
69- compilation to avoid building the Rust crate. Ensure the NIF (and any required
70- ` libonnxruntime ` binaries) are available in ` priv/native ` for the target platform.
71-
72- ``` sh
73- ORTEX_SKIP_COMPILE=1 mix compile
74- ```
75-
7666## Execution provider features
7767
7868Ortex relies on ` ort ` cargo features to compile support for non-CPU execution providers.
@@ -89,3 +79,31 @@ ORTEX_FEATURES=cuda,tensorrt mix compile
8979```
9080
9181Enabling GPU providers requires the relevant system toolchains to be installed.
82+
83+ ### Packaging and Offline Builds
84+
85+ If you are packaging Ortex with a precompiled NIF, set ` ORTEX_SKIP_COMPILE=1 ` during
86+ compilation to avoid building the Rust crate. Ensure the NIF (and any required
87+ ` libonnxruntime ` binaries) are available in ` priv/native ` for the target platform.
88+
89+ ``` sh
90+ ORTEX_SKIP_COMPILE=1 mix compile
91+ ```
92+
93+ For offline or system-provided ONNX Runtime builds, you can disable downloads and
94+ link dynamically using a local runtime install:
95+
96+ ``` sh
97+ ORTEX_SKIP_DOWNLOAD=1 \
98+ ORT_PREFER_DYNAMIC_LINK=1 \
99+ ORT_LIB_LOCATION=/path/to/onnxruntime/lib \
100+ mix compile
101+ ```
102+
103+ If your package provides ` libonnxruntime.pc ` , enable pkg-config lookup:
104+
105+ ``` sh
106+ ORTEX_FEATURES=pkg-config \
107+ PKG_CONFIG_PATH=/path/to/onnxruntime/lib/pkgconfig \
108+ mix compile
109+ ```
You can’t perform that action at this time.
0 commit comments