intamixx / matnn

Matnn (Music Audio Tagger Neural Net) is a rest compliant music tag service utilizing a batch queuing system (Kueue) running on a Kubernetes cluster. Matnn utilizes the (Discogs-EffNet) model from (Essentia) to predict music classification, BPM (Beats per minute) and tonal/key scale from over 400 genres of music.
https://matnn.intamixx.uk
3 stars 0 forks source link

instructions to run locally #2

Closed gingerbeardman closed 4 months ago

gingerbeardman commented 4 months ago

I'd like to run this locally using docker

  1. to more easily be able to help fixing things like #1
  2. to avoid having to upload many files to your server

I'm able to pull the image and set a container, but it doesn't seem to expose any ports?

Alternatively, if there's a way to run this locally that isn't docker i'd appreciate any info

intamixx commented 4 months ago

yes of course. I am looking to run it locally to genre tag some of my music files/folders. Feel free to use as you like. I'll put up some instructions for running the standalone container. The container itself needs tidying as I was adding to it as I went along. Its a very basic run script at the moment, but I run it like ;

docker run -v /home/local_mp3_dir:/container_mnt --rm -it intamixx/musicnn_v2:latest /musicnn/run.sh -h

run.sh v1

Usage: run.sh [options] Wrapper script to run matnn jobs

-f filename of song -g genre tag required (musicnn or discogseffnet) -b bpm tag required -k key tag required -a approachability / engagement required -w webhook required (destination url) -i display job_id -h Display this help message and exit

docker run -v /home/local_mp3_dir:/container_mnt --rm -it intamixx/musicnn_v2:latest /musicnn/run.sh -f /container_mnt/audio.mp3 -g discogseffnet -b -k -a

Outputs a whole load of stuff about out of date libraries and nvidia cuda drivers (if it cannot find any) and puts the results into the mounted directory;

rwxr-xr-x 2 root root 4096 Jul 2 16:26 . drwx------ 10 root root 4096 Jul 2 16:24 .. -rw-r--r-- 1 root root 4877720 Jul 2 16:23 audio.mp3 -rw-r--r-- 1 root root 200 Jul 2 16:28 audio.mp3.ae -rw-r--r-- 1 root root 24 Jul 2 16:28 audio.mp3.bpm -rw-r--r-- 1 root root 166 Jul 2 16:28 audio.mp3.genre -rw-r--r-- 1 root root 32 Jul 2 16:28 audio.mp3.key

The container doesn't expose any ports, as when its scheduled by kueue it just mounts a nfs directory and launches the run.sh wrapper script.

gingerbeardman commented 4 months ago

Great, will look into this tomorrow.

I'm working on a music game and I am splitting tracks into stems using UVR, beat analysis using aubio, genre tagging using your tool, and then I will need to make the game around it all :)

intamixx commented 4 months ago

If it helps, a few months ago I did some beat detection tests with aubio https://www.youtube.com/watch?v=dvyG7D-vqbc

and also with pure data https://www.youtube.com/watch?v=RvbTBNullGg

gingerbeardman commented 4 months ago

Instant sub!