-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discussion] Spleeter works natively on Apple Silicon Macs if you use Apple's version of TensorFlow #696
Comments
Hi @argsnd, |
// fixed by doing (conda install -c conda-forge poetry) not the pip install, though numpy error has shown in poetry update/install process, but it works well in poetry build for conda "base" case but I've tried several times, it's not working for conda "env" case. if you want to use multi "env" case, I think not available this moment. please let me know if succeed. #grpcio fails to install on Apple Silicon I've got some error message related to numpy library while progressing "poetry update/install/build", there might be conflicting with the other libraries? |
Puh, I finally got spleeter running, thanks for the guide @argsnd
|
Got it running too. MacBook Air (M1, 2020), macOS 12.2 # https://developer.apple.com/metal/tensorflow-plugin/
conda install -c apple tensorflow-deps==2.5.0
python -m pip install tensorflow-macos==2.5.0
python -m pip install tensorflow-metal
conda install -c apple llvmlite==0.36.0 numba pandas==1.3.3
git clone --depth 1 --branch v2.3.0 https://github.com/deezer/spleeter.git
# edit pyproject.toml :
# -tensorflow = "2.5.0"
# +tensorflow-macos = "2.5.0"
python -m pip install ./spleeter
brew install libsndfile
sudo ln -s /opt/homebrew/lib/libsndfile.dylib /usr/local/lib/ |
I haven't been able to install this. Running the commands exactly as stated in the OP results in an error in the final step that complains that × Building wheel for numpy (pyproject.toml) did not run successfully.
× Encountered error while trying to install package.
╰─> llvmlite
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> grpcio I don't want to post full output because it is quite long. I'm on macOS 12.3 M1 Pro MBP. |
@Tenpi Check out the new instructions here: #607 (comment) Following the exact steps, I can get it to work on macOS 12.3.1 M1 Max MBP. |
is it normal that resolving dependencies takes that long and counting
|
@AlexanderPavlenko |
Hey, if anyone's willing to experiment, I got it working over here using m1 native tensorflow but couldn't get past what i believe was a circular dependency issue. If you can figure out how to do it using those instructions on my fork, patches are welcome! |
Is this not officially supported for arm64? |
Thank you SO much for this. |
@prince-ravi-leow Hi, could you share how you adapt the steps to newer dep versions? I'm kinda struggling to make it work on M1 with the steps listed. |
Hi there. 👋 I've done my best to adapt the steps, I took to get My installation info:
Pre-requisites:
Adapted From AlexanderPavlenko’s answer on: #696 Conda environmentCreate new If you go through my instructions and they don't work the first time, try create a new env, re-configure it to Tensorflow dependancies for apple siliconInstall latest Install latest Install latest Run: It may say that Clone spleeter repo
Configure poetry file
Edit Install the d*mn thing
Finishing touches (for media encoding/export)
(Optional: EpilogueIf this STILL doesn't work for you, find Alex's original comment, and try and adapt them on your own - they are much more general than my case, and maybe a different operation will suit you best. Hope you get it up and running! 🙏 |
Thanks for the detailed solution! I've encountered one problem using the tensorflow-macos version 2.11.0. But after I upgraded to the latest version, everything works fine now. |
I followed @junlan0050 procedure. My setup:
After following the procedure I was getting an error:
I checked the version of tensorflow: 2.16.1 I uninstalled tensorflow:
Then I reinstalled with this version:
Then spleeter worked for me. I hope this helps. |
Spleeter is working for me natively on my M1 Max MacBook Pro, built against Apple's Metal version of TensorFlow.
Instructions from memory:
brew install miniforge
conda init "$(basename "${SHELL}")"
conda install -c apple tensorflow-deps numpy scipy llvmlite librosa pandas
pip install tensorflow-macos tensorflow-metal
git clone https://github.com/Deezer/spleeter && cd spleeter
pip install poetry
poetry update
poetry install
poetry build
pip install ./dist/spleeter-2.3.0-py3-none-any.whl
You might have to adapt some of these instructions, but it should broadly set you on the right path.
The text was updated successfully, but these errors were encountered: