Skip to content

Commit

Permalink
python3Packages.torchaudio-bin: drop ffmpeg_{4,5}
Browse files Browse the repository at this point in the history
These don’t seem necessary.
  • Loading branch information
emilazy committed Jul 14, 2024
1 parent ca258d2 commit bc16039
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkgs/development/python-modules/torchaudio/bin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
buildPythonPackage,
cudaPackages,
fetchurl,
ffmpeg_4,
ffmpeg_5,
ffmpeg_6,
sox,
pythonAtLeast,
Expand All @@ -33,9 +31,7 @@ buildPythonPackage rec {

buildInputs =
[
# We need to patch the lib/_torchaudio_ffmpeg[4-6]
ffmpeg_4.dev
ffmpeg_5.dev
# We need to patch lib/torio/_torio_ffmpeg6
ffmpeg_6.dev
sox
]
Expand Down Expand Up @@ -63,6 +59,12 @@ buildPythonPackage rec {
addAutoPatchelfSearchPath "${torch-bin}/${python.sitePackages}/torch"
'';

preFixup = ''
# TorchAudio loads the newest FFmpeg that works, so get rid of the
# old ones.
rm $out/${python.sitePackages}/torio/lib/{lib,_}torio_ffmpeg{4,5}.*
'';

# The wheel-binary is not stripped to avoid the error of `ImportError: libtorch_cuda_cpp.so: ELF load command address/offset not properly aligned.`.
dontStrip = true;

Expand Down

0 comments on commit bc16039

Please sign in to comment.