Deploy AudioMuse-AI (sonic analysis + playlists for Navidrome) via Docker Compose
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul Provost 5fd338a478 Initial AudioMuse-AI role: CPU image, Navidrome, Ollama, NV plugin
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:23:39 -04:00
defaults Initial AudioMuse-AI role: CPU image, Navidrome, Ollama, NV plugin 2026-10-21 16:23:39 -04:00
handlers Initial AudioMuse-AI role: CPU image, Navidrome, Ollama, NV plugin 2026-10-21 16:23:39 -04:00
meta Initial AudioMuse-AI role: CPU image, Navidrome, Ollama, NV plugin 2026-10-21 16:23:39 -04:00
tasks Initial AudioMuse-AI role: CPU image, Navidrome, Ollama, NV plugin 2026-10-21 16:23:39 -04:00
templates Initial AudioMuse-AI role: CPU image, Navidrome, Ollama, NV plugin 2026-10-21 16:23:39 -04:00
README.md Initial AudioMuse-AI role: CPU image, Navidrome, Ollama, NV plugin 2026-10-21 16:23:39 -04:00

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_password
  • audiomuse_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_model
  • audiomuse_navidrome_plugin_dir: Navidrome's <DataFolder>/plugins on 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 resolve localhost or host.docker.internal to the host.
  • API Token: audiomuse_api_token.

First run

  1. Open http://<host>:<audiomuse_port>, log in, and finish the Setup Wizard. Navidrome and the AI provider are prefilled from the env.
  2. Start an analysis from the Analysis tab. A large library takes hours on CPU.
  3. Then run clustering to generate playlists. They appear in Navidrome.

Tags

  • config: directories, .env, compose file
  • upgrade: pull images (only runs when explicitly requested with --tags upgrade)
  • container: bring the stack up
  • navidrome-plugin: download the Navidrome plugin
  • verify: wait for the web UI