diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2019-08-26 20:46:04 -0700 |
---|---|---|
committer | Jonathan Ringer <jonringer117@gmail.com> | 2019-10-02 00:47:58 -0700 |
commit | e38f32a468c7da4afe7d101580ee482ec7619678 (patch) | |
tree | e9d83b3649a375ae0b9e9a4b4e7fb141703658cc /pkgs/development/libraries/onnxruntime | |
parent | 8a866548cce841c742c9a01ff998740759940312 (diff) | |
download | nixpkgs-e38f32a468c7da4afe7d101580ee482ec7619678.tar nixpkgs-e38f32a468c7da4afe7d101580ee482ec7619678.tar.gz nixpkgs-e38f32a468c7da4afe7d101580ee482ec7619678.tar.bz2 nixpkgs-e38f32a468c7da4afe7d101580ee482ec7619678.tar.lz nixpkgs-e38f32a468c7da4afe7d101580ee482ec7619678.tar.xz nixpkgs-e38f32a468c7da4afe7d101580ee482ec7619678.tar.zst nixpkgs-e38f32a468c7da4afe7d101580ee482ec7619678.zip |
onnxruntime: init at 0.5.0
Diffstat (limited to 'pkgs/development/libraries/onnxruntime')
-rw-r--r-- | pkgs/development/libraries/onnxruntime/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix new file mode 100644 index 00000000000..b5549c6735f --- /dev/null +++ b/pkgs/development/libraries/onnxruntime/default.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchFromGitHub, glibcLocales +, cmake, python3 +}: + +stdenv.mkDerivation rec { + pname = "onnxruntime"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "onnxruntime"; + rev = "v${version}"; + sha256 = "0s8ylc5xr55490hbz7zn3hnp9dnyp92d320ln8xw5hqkw3mgyr3p"; + # TODO: use nix-versions of grpc, onnx, eigen, googletest, etc. + # submodules increase src size and compile times significantly + # not currently feasible due to how integrated cmake build is with git + fetchSubmodules = true; + }; + + # TODO: build server, and move .so's to lib output + outputs = [ "out" "dev" ]; + + nativeBuildInputs = [ + cmake + python3 # for shared-lib or server + ]; + + cmakeDir = "../cmake"; + + cmakeFlags = [ + "-Donnxruntime_USE_OPENMP=ON" + "-Donnxruntime_BUILD_SHARED_LIB=ON" + "-Donnxruntime_ENABLE_LTO=ON" + ]; + + # ContribOpTest.StringNormalizerTest sets locale to en_US.UTF-8" + preCheck = stdenv.lib.optionalString stdenv.isLinux '' + export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive" + ''; + doCheck = true; + + postInstall = '' + rm -r $out/bin # ctest runner + ''; + + meta = with stdenv.lib; { + description = "Cross-platform, high performance scoring engine for ML models"; + longDescription = '' + ONNX Runtime is a performance-focused complete scoring engine + for Open Neural Network Exchange (ONNX) models, with an open + extensible architecture to continually address the latest developments + in AI and Deep Learning. ONNX Runtime stays up to date with the ONNX + standard with complete implementation of all ONNX operators, and + supports all ONNX releases (1.2+) with both future and backwards + compatibility. + ''; + homepage = "https://github.com/microsoft/onnxruntime"; + license = licenses.mit; + maintainers = with maintainers; [ jonringer ]; + }; + +} |