GNI uses pyo3 to write a native python library, and maturin is the recommended build tool.
$ pip install gni
Running the library:
$ python
>>> import gni_lib
>>> gni_lib.get_gpu_node_id()
<id>
-
Install maturin (see maturin installation guide)
pip install maturin
-
Builds the package
maturin build
You can view the built wheels in the target/wheels directory
-
Builds the crate and installs it in the current env
maturin develop --features python
-
Run gni
python src/python/main.py