- Jinja 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| defaults | ||
| handlers | ||
| meta | ||
| tasks | ||
| templates | ||
| README.md | ||
ansible-role-audiomuse-ai
Deploys AudioMuse-AI via Docker Compose. AudioMuse-AI analyses the sound of a music library and builds playlists from it: clustering, similar songs, song paths, and chat-style "instant playlists". This role's templates only cover Navidrome as the media server.
The stack has three containers: postgres (15-alpine), audiomuse-ai-flask (web UI/API) and audiomuse-ai-worker (analysis/clustering jobs). Upstream no longer uses Redis; the task queue runs on Postgres.
GPU
Upstream's GPU images (-nvidia) are built on CUDA (onnxruntime-gpu, cuML), and there is no AMD/ROCm variant. This role therefore runs the CPU image. Analysis is a one-time scan of the library, after which only new tracks are analysed. It needs an AVX2 CPU; otherwise use the -noavx2 tag through audiomuse_version.
On a host with a GPU, the LLM features can still use it: set audiomuse_ai_provider: OLLAMA and point audiomuse_ollama_url at a GPU-backed Ollama.
Variables
See defaults/main.yml. Required:
audiomuse_db_password
Commonly set:
audiomuse_navidrome_url,audiomuse_navidrome_user,audiomuse_navidrome_passwordaudiomuse_admin_user,audiomuse_admin_password,audiomuse_api_token,audiomuse_jwt_secret. Authentication turns on only when the user, password and token are all set.audiomuse_ai_provider,audiomuse_ollama_url,audiomuse_ollama_modelaudiomuse_navidrome_plugin_dir: Navidrome's<DataFolder>/pluginson the host, to install the Navidrome plugin
Navidrome and Ollama are reached as host.docker.internal (mapped to the host gateway), so they only need to be published on the host.
The media-server and AI settings seed AudioMuse's config on first start. Once the Setup Wizard has saved its own values in the database, those values take precedence over the env.
Navidrome plugin
The plugin replaces Navidrome's Instant Mix, artist radio and similar-artist info with AudioMuse results. Its version must stay aligned with both AudioMuse-AI and Navidrome. When you bump audiomuse_version, also bump audiomuse_navidrome_plugin_version and its checksum.
Navidrome needs these settings, for example through the navidrome role's navidrome_extra_env:
ND_PLUGINS_ENABLED: "true"
ND_PLUGINS_AUTORELOAD: "true"
ND_AGENTS: "audiomuseai,lastfm,deezer" # order matters: first sonic-similarity agent wins
Then, once, in Navidrome's web UI under Plugins, enable AudioMuse-AI and set:
- API URL:
http://<host LAN IP>:<audiomuse_port>. Navidrome's container doesn't resolvelocalhostorhost.docker.internalto the host. - API Token:
audiomuse_api_token.
First run
- Open
http://<host>:<audiomuse_port>, log in, and finish the Setup Wizard. Navidrome and the AI provider are prefilled from the env. - Start an analysis from the Analysis tab. A large library takes hours on CPU.
- Then run clustering to generate playlists. They appear in Navidrome.
Tags
config: directories,.env, compose fileupgrade: pull images (only runs when explicitly requested with--tags upgrade)container: bring the stack upnavidrome-plugin: download the Navidrome pluginverify: wait for the web UI