Unverified Commit 4ed8d70f authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

python312Packages.openai-whisper: cleanup & skip test crashing on aarch64-linux (#386259)

parents f03c983c bcd7c3e4
Loading
Loading
Loading
Loading
+19 −15
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
  # runtime
  ffmpeg-headless,

  # propagates
  # dependencies
  more-itertools,
  numba,
  numpy,
@@ -23,6 +23,7 @@
  # tests
  pytestCheckHook,
  scipy,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage rec {
@@ -54,30 +55,33 @@ buildPythonPackage rec {
    tqdm
  ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform triton) [ triton ];

  preCheck = ''
    export HOME=$TMPDIR
  '';

  nativeCheckInputs = [
    pytestCheckHook
    scipy
    writableTmpDirAsHomeHook
  ];

  disabledTests = [
  disabledTests =
    [
      # requires network access to download models
      "test_transcribe"

      # requires NVIDIA drivers
      "test_dtw_cuda_equivalence"
      "test_median_filter_equivalence"
    ]
    ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
      # Fatal Python error: Segmentation fault
      "test_dtw"
    ];

  meta = with lib; {
  meta = {
    changelog = "https://github.com/openai/whisper/blob/v${version}/CHANGELOG.md";
    description = "General-purpose speech recognition model";
    mainProgram = "whisper";
    homepage = "https://github.com/openai/whisper";
    license = licenses.mit;
    maintainers = with maintainers; [
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      hexa
      MayNiklas
    ];