used pytorch with cuda.
This commit is contained in:
1 parent
8ddda784a4
commit
eb2f223c30
1 file changed
+11
-4
@@ -5,6 +5,13 @@
|
|||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixConfig = {
|
||||||
|
extra-substituters = [ "https://cuda-maintainers.cachix.org" ];
|
||||||
|
extra-trusted-public-keys = [
|
||||||
|
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
@@ -64,7 +71,7 @@
|
|||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with pythonPackages; [ numpy torch ];
|
propagatedBuildInputs = with pythonPackages; [ numpy torchWithCuda ];
|
||||||
|
|
||||||
nativeBuildInputs = with pythonPackages; [
|
nativeBuildInputs = with pythonPackages; [
|
||||||
setuptools
|
setuptools
|
||||||
@@ -100,7 +107,7 @@
|
|||||||
propagatedBuildInputs = with pythonPackages; [
|
propagatedBuildInputs = with pythonPackages; [
|
||||||
requests
|
requests
|
||||||
pyyaml
|
pyyaml
|
||||||
torch
|
torchWithCuda
|
||||||
tqdm
|
tqdm
|
||||||
psutil
|
psutil
|
||||||
torchvision
|
torchvision
|
||||||
@@ -154,7 +161,7 @@
|
|||||||
numpy
|
numpy
|
||||||
pandas
|
pandas
|
||||||
pyyaml
|
pyyaml
|
||||||
torch
|
torchWithCuda
|
||||||
yacs
|
yacs
|
||||||
torchvision
|
torchvision
|
||||||
ftfy
|
ftfy
|
||||||
@@ -194,7 +201,7 @@
|
|||||||
python312Packages.opencv4 = custom-opencv4;
|
python312Packages.opencv4 = custom-opencv4;
|
||||||
};
|
};
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = [ (pkgs.python312.withPackages (ps: [ ])) ];
|
buildInputs = [ (pkgs.python312.withPackages (ps: [ ultralytics ])) ];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user