Giter VIP home page Giter VIP logo

Comments (6)

mcherep avatar mcherep commented on June 9, 2024 1

I'm trying to install it on M1 and I have the same issue. It'd be great to support it!

from beatnet.

aphillipo avatar aphillipo commented on June 9, 2024 1

I'm sort of there inside docker at least, using my own repo that just removes the version numbers on librosa and numba...

Here is the current docker:

FROM ubuntu:22.04
# avoid stuck build due to user prompt
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y
RUN apt-get install libasound-dev libportaudio2 libportaudiocpp0 portaudio19-dev libsndfile1 -y
RUN apt-get install -y wget 
RUN apt-get install software-properties-common git -y
RUN add-apt-repository ppa:deadsnakes/ppa -y
RUN apt update
RUN apt-get install -y python3.8 python3.8-dev python3.8-venv build-essential 
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

RUN bash -c 'wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key' | apt-key add -
RUN add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main'
RUN apt-get install llvm-11* -y

RUN python3.8 -m venv /venv
ENV PATH=/venv/bin:$PATH

RUN pip3 install --no-cache-dir soundfile
RUN pip3 install --no-cache-dir numpy
RUN pip3 install --no-cache-dir numba
RUN pip3 install --no-cache-dir Pyaudio
RUN pip3 install --no-cache-dir cython
RUN pip3 install --no-cache-dir git+https://github.com/aphillipo/BeatNet

CMD ["python"]

To run it add the above to a directory in a file called Dockerfile and then run the following:

docker build -t beatnet-dockerised .
docker run --rm --device /dev/null:/dev/snd -it beatnet-dockerised

This will drop you into a python shell that might be able to run the offline models - the streaming ones seem to have an ASLA crash that I don't understand.

Anyway this is at least a start, it would be good for the author to consider checking if the packages he depends on specific versions for have been fixed because they cause incompatibility on MacOS and make things very hard to build. I'll leave mounting a volume for music to read from as an exercise for the reader...

from beatnet.

danigb avatar danigb commented on June 9, 2024 1

This seems to work on my computer:

LLVM_CONFIG="/opt/homebrew/Cellar/llvm@11/11.1.0_4/bin/llvm-config" arch -arm64 pip install BeatNet

Source: https://stackoverflow.com/questions/67567987/m1-mac-how-to-install-llvm

from beatnet.

aphillipo avatar aphillipo commented on June 9, 2024

Interesting, if I remove the versions from numpy and librosa things seem to work inside docker at least on an M1. Here is the docker so you can see what I'm doing...

FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y
RUN apt-get install libasound-dev libportaudio2 libportaudiocpp0 portaudio19-dev -y
RUN apt-get install -y wget 
RUN apt-get install --no-install-recommends -y python3.10 python3.10-dev python3.10-venv build-essential && apt-get clean 
RUN apt-get install software-properties-common git -y
RUN rm -rf /var/lib/apt/lists/*

RUN bash -c 'wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key' | apt-key add -
RUN add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main'
RUN apt-get install llvm-11* -y

RUN useradd --create-home myuser

RUN python3 -m venv /home/myuser/venv
ENV PATH="/home/myuser/venv/bin:$PATH"

RUN pip3 install --no-cache-dir numpy
RUN pip3 install --no-cache-dir numba
RUN pip3 install --no-cache-dir Pyaudio
RUN pip3 install --no-cache-dir cython
RUN pip3 install --no-cache-dir git+https://github.com/aphillipo/BeatNet

CMD ["python"]

from beatnet.

llemtt avatar llemtt commented on June 9, 2024

I've managed to compile on my M2 running Ventura installing llvm-11 with MacPorts and using:

LLVM_CONFIG="/opt/local/libexec/llvm-11/bin/llvm-config" arch -arm64 pip install BeatNet

but

from BeatNet.BeatNet import BeatNet

fails with this error:

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/teo/Library/Python/3.9/lib/python/site-packages/BeatNet/BeatNet.py", line 8, in <module> from madmom.features import DBNDownBeatTrackingProcessor File "/Users/teo/Library/Python/3.9/lib/python/site-packages/madmom/__init__.py", line 24, in <module> from . import audio, evaluation, features, io, ml, models, processors, utils File "/Users/teo/Library/Python/3.9/lib/python/site-packages/madmom/audio/__init__.py", line 27, in <module> from . import comb_filters, filters, signal, spectrogram, stft File "madmom/audio/comb_filters.pyx", line 1, in init madmom.audio.comb_filters ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

?

from beatnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.