This commit is contained in:
Star Dorminey 2023-04-06 17:19:04 -07:00
parent f50b88aa02
commit 529e36ffb0
3 changed files with 6 additions and 6 deletions

View file

@ -2537,7 +2537,7 @@ lib.composeManyExtensions [
preFixup = ''
addAutoPatchelfSearchPath "${self.torch}/${self.python.sitePackages}/torch/lib"
'';
buildInputs = (old.buildInputs or [ ]) ++ [
self.torch
];

View file

@ -105,7 +105,7 @@ builtins.removeAttrs
rmfuse = skipOSX pkgs.rmfuse;
ml-stack = callTest ./ml-stack { };
# Test building poetry
inherit poetry;

View file

@ -7,10 +7,10 @@ let
preferWheels = true;
};
py = env.python;
in
in
# Note: torch.cuda() will print False, even if you have a GPU, when this runs *during test.*
# But if you run the script below in your shell (rather than during build), it will print True.
# Presumably this is due to sandboxing.
# But if you run the script below in your shell (rather than during build), it will print True.
# Presumably this is due to sandboxing.
runCommand "ml-stack-test" { } ''
${env}/bin/python -c 'import torch; import torchvision; print(torch.__version__); print(torchvision.__version__); print(torch.cuda.is_available()); x = torch.randn(3,3); x = x.cuda() if torch.cuda.is_available() else x; print(x**2)' > $out
''
''