depdency for cuda

This commit is contained in:
Matthew Deville 2026-04-23 17:36:20 +02:00
parent c217578536
commit 5660af24f7
3 changed files with 26 additions and 10 deletions

View file

@ -9,7 +9,7 @@
hex = "0.4"
image = "0.25"
ndarray = "0.17"
ort = "=2.0.0-rc.12"
ort = { version = "=2.0.0-rc.12", features = ["cuda"] }
reqwest = { version = "0.13", features = ["blocking"] }
sha2 = "0.11"
show-image = { version = "0.14", features = ["image"] }

View file

@ -62,11 +62,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1776827647,
"narHash": "sha256-sYixYhp5V8jCajO8TRorE4fzs7IkL4MZdfLTKgkPQBk=",
"lastModified": 1776914043,
"narHash": "sha256-qug5r56yW1qOsjSI99l3Jm15JNT9CvS2otkXNRNtrPI=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "40e6ccc06e1245a4837cbbd6bdda64e21cc67379",
"rev": "2d35c4358d7de3a0e606a6e8b27925d981c01cc3",
"type": "github"
},
"original": {

View file

@ -18,7 +18,10 @@
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
pkgs = import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
};
stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.clangStdenv;
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
@ -32,10 +35,10 @@
];
xorgBuildInputs = with pkgs; [
xorg.libx11
xorg.libxcursor
xorg.libxi
xorg.libxrandr
libx11
libxcursor
libxi
libxrandr
];
waylandBuildInputs = with pkgs; [
@ -49,7 +52,20 @@
openssl
];
buildInputs = xorgBuildInputs ++ waylandBuildInputs ++ graphicsBuildInputs;
# CUDA runtime libraries required by ONNX Runtime CUDA EP.
cudaBuildInputs = with pkgs.cudaPackages; [
cuda_cudart
libcublas
libcurand
libcufft
cudnn
];
buildInputs =
xorgBuildInputs
++ waylandBuildInputs
++ graphicsBuildInputs
++ cudaBuildInputs;
mkShell = pkgs.mkShell.override {
stdenv = stdenv;