Skip to content

Commit

Permalink
python312Packages.accelerate: use addBinToPathHook, use `writableTm…
Browse files Browse the repository at this point in the history
…pDirAsHomeHook`
  • Loading branch information
drupol committed Jan 31, 2025
1 parent a74cba7 commit 71cfe3b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkgs/development/python-modules/accelerate/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
torch,

# tests
addBinToPathHook,
evaluate,
parameterized,
pytest7CheckHook,
transformers,
config,
cudatoolkit,
writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
Expand Down Expand Up @@ -56,19 +58,17 @@ buildPythonPackage rec {
];

nativeCheckInputs = [
addBinToPathHook
evaluate
parameterized
pytest7CheckHook
transformers
writableTmpDirAsHomeHook
];
preCheck =
''
export HOME=$(mktemp -d)
export PATH=$out/bin:$PATH
''
+ lib.optionalString config.cudaSupport ''
export TRITON_PTXAS_PATH="${cudatoolkit}/bin/ptxas"
'';

preCheck = lib.optionalString config.cudaSupport ''
export TRITON_PTXAS_PATH="${cudatoolkit}/bin/ptxas"
'';
pytestFlagsArray = [ "tests" ];
disabledTests =
[
Expand Down

0 comments on commit 71cfe3b

Please sign in to comment.