python3Packages.onnxruntime: buildInputs dep on onnxruntime (#382903)

This commit is contained in:
Pol Dellaiera 2025-02-18 06:09:46 +01:00 committed by GitHub
commit 73efae15bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,6 +50,13 @@ buildPythonPackage {
oneDNN
re2
onnxruntime.protobuf
# https://github.com/NixOS/nixpkgs/pull/357656 patches the onnx lib to ${pkgs.onnxruntime}/lib
# but these files are copied into this package too. If the origional non-python onnxruntime
# package is GC-ed, cuda support in this python package will break.
# Two options, rebuild onnxruntime twice with the different paths hard-coded, or just hold a runtime
# dependency between the two. Option 2, because onnxruntime takes forever to build with cuda support.
onnxruntime
]
++ lib.optionals onnxruntime.passthru.cudaSupport (
with onnxruntime.passthru.cudaPackages;