Skip to content

Instantly share code, notes, and snippets.

@fathonix
Last active May 14, 2024 04:15
Show Gist options
  • Save fathonix/5563346885ca44044b1d52102bf0305e to your computer and use it in GitHub Desktop.
Save fathonix/5563346885ca44044b1d52102bf0305e to your computer and use it in GitHub Desktop.
Install Apple Silicon-native Spleeter without Conda
#!/bin/bash -e
# Install Apple Silicon-native Spleeter without Conda
# Tested on macOS 14.1, M1 MBP, 2024-05-07
# Licensed under MIT. (c) 2024 Aldo Adirajasa Fathoni
# Assuming Xcode CLT and Homebrew have been installed
brew install [email protected] ffmpeg libsndfile
mkdir spleeter
python3.9 -m venv spleeter
source spleeter/bin/activate
curl -LO https://files.pythonhosted.org/packages/c6/53/29206ffb504c370edc635931812bea2461a6289cec35baf834a1a08c28c8/spleeter-2.4.0.tar.gz
curl -LO https://gist.github.com/fathonix/5563346885ca44044b1d52102bf0305e/raw/00e3622135313c0d3b1b744f0eceddc1b3db684f/spleeter-use-tensorflow-macos.patch
tar xf spleeter-2.4.0.tar.gz
patch -d spleeter-2.4.0 -p1 < spleeter-use-tensorflow-macos.patch
pip install tensorflow-metal==0.5.0 ./spleeter-2.4.0
./spleeter/bin/spleeter --version
diff -Paru spleeter-2.4.0/pyproject.toml spleeter-2.4.0b/pyproject.toml
--- spleeter-2.4.0/pyproject.toml 2023-07-10 17:06:32
+++ spleeter-2.4.0b/pyproject.toml 2024-05-07 15:53:34
@@ -51,7 +51,7 @@
typer = "^0.3.2"
musdb = {version = "^0.4.0", optional = true}
museval = {version = "^0.4.0", optional = true}
-tensorflow = "^2.5.0, <2.10.0"
+tensorflow-macos = "^2.5.0, <2.10.0"
pandas = "^1.3.0"
norbert = "^0.2.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment