User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:audiomuseai [2025/10/14 18:21] – [Installation] willyservices:audiomuseai [2025/10/15 11:57] (current) willy
Line 4: Line 4:
  
 This pairs with [[services:navidrome|Navidrome]], that you need to have installed. This pairs with [[services:navidrome|Navidrome]], that you need to have installed.
 +
 +The AudioMuse-AI developers like you to know that //they are not affiliated with, endorsed by, or sponsored by the owners of audiomuse.ai website.//
  
 ===== Installation ===== ===== Installation =====
Line 10: Line 12:
 <code bash> <code bash>
 bash ~ # lscpu  | grep -i avx bash ~ # lscpu  | grep -i avx
-Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities+Flags:     fpu [...] avx [..] avx2 [...] arch_capabilities
 </code> </code>
  
 As you can see, my CPU supports AVX and AVX2. As you can see, my CPU supports AVX and AVX2.
  
-Then create the usual dedicated user:+Then create the usual dedicated user and data folders for persistency:
 <code bash> <code bash>
 useradd -m -d /data/daemons/audiomuse-ai audiomuse-ai useradd -m -d /data/daemons/audiomuse-ai audiomuse-ai
 +mkdir /data/audiomuse
 +mkdir /data/audiomuse/temp_audio
 +mkdir /data/audiomuse/postgres_data
 +chown -R audiomuse-ai:audiomuse-ai /data/audiomuse
 </code> </code>
  
Line 32: Line 38:
         - "8925:8000"         - "8925:8000"
     volumes:     volumes:
-      - /data/daemons/audiomuse-ai/temp_audio:/app/temp_audio+      - /data/audiomuse/temp_audio:/app/temp_audio
     environment:     environment:
         MEDIASERVER_TYPE: "navidrome"         MEDIASERVER_TYPE: "navidrome"
Line 58: Line 64:
 #        - "8925:8000" #        - "8925:8000"
     volumes:     volumes:
-      - /data/daemons/audiomuse-ai/temp_audio:/app/temp_audio+      - /data/audiomuse/temp_audio:/app/temp_audio
     environment:     environment:
         MEDIASERVER_TYPE: "navidrome"         MEDIASERVER_TYPE: "navidrome"
Line 84: Line 90:
     image: postgres:15-alpine     image: postgres:15-alpine
     volumes:     volumes:
-      - /data/daemons/audiomuse-ai/postgres_data:/var/lib/postgresql/data+      - /data/audiomuse/postgres_data:/var/lib/postgresql/data
     environment:     environment:
         SERVICE_TYPE: "flask"         SERVICE_TYPE: "flask"
Line 102: Line 108:
     image: redis:7-alpine     image: redis:7-alpine
     volumes:     volumes:
-      - /data/daemons/audiomuse-ai/postgres_data:/var/lib/postgresql/data+      - /data/audiomuse/postgres_data:/var/lib/postgresql/data
     environment:     environment:
         SERVICE_TYPE: "flask"         SERVICE_TYPE: "flask"
Line 123: Line 129:
 Of course, you need to specify your Navidrome URL, user and password. The GEMINI key is not required, only if you want AI assisted playlist naming. You could also use a self-hosted OLLAMA. Of course, you need to specify your Navidrome URL, user and password. The GEMINI key is not required, only if you want AI assisted playlist naming. You could also use a self-hosted OLLAMA.
  
 +===== Gemini AI usage =====
 +
 +If you want to use the capability to create playlists names using AI, you can use Gemini (and others too). Go to [[https://aistudio.google.com/app/apikey|Google AI studio page]], create a new API key and project, and copy the key itself into the relevant line in the above Docker Compose file.
 +
 +
 +===== Reverse Proxy =====
 +
 +AudioMuse-ai seems to be working only on subdomain and not on subpath. I assume you have **am.mydomain.com**. See the [[selfhost:nginx|F) The Reverse Proxy concept]] for more details.
 +
 +<file - spotizerr.conf>
 +server {
 +        server_name am.mydomain.com;
 +        listen 443 ssl;
 +        http2 on;
 +
 +        access_log /var/log/nginx/am.mydomain.com_access_log main;
 +        error_log /var/log/nginx/am.mydomain.com_error_log info;
 +
 +        location / {
 +                proxy_pass http://127.0.0.1:7171/;
 +                proxy_set_header Connection $http_connection;
 +                proxy_set_header Upgrade $http_upgrade;
 +        }
 +
 +        include com.mydomain/certbot.conf;
 +}
 +
 +server {
 +        server_name am.mydomain.com;
 +        listen 8443 ssl;
 +        http2 on;
 +
 +        access_log /var/log/nginx/am.mydomain.com_access_log main;
 +        error_log /var/log/nginx/am.mydomain.com_error_log info;
 +
 +        include "com.mydomain/authelia_location.conf";
 +
 +        location / {
 +                include "com.mydomain/authelia_proxy.conf";
 +                include "com.mydomain/authelia_authrequest.conf";
 +                proxy_pass http://127.0.0.1:7171/;
 +                proxy_set_header Connection $http_connection;
 +                proxy_set_header Upgrade $http_upgrade;
 +        }
 +
 +        include com.mydomain/certbot.conf;
 +}
 +</file>
 +
 +Please note that AudioMuse-ai does not provide **any** authentication or protection: you **must** put your SSO (see [[selfhost:sso|here]]) and HTTPS on top of it using the reverse proxy as in the above config example.
 +
 +As usual, i have protected with SSO only the external access profile (port 8443).
 +
 +===== Autostart =====
 +
 +
 +To start it, and set it up on boot, as usual follow my indications [[gentoo:containers|Using Containers on Gentoo]], so link the **user-containers** init script:
 +<code>
 +ln -s /etc/init.d/user-containers /etc/init.d/user-containers.audiomuse-ai
 +</code>
 +
 +and create the following config file:
 +<file - user-containers.audiomuse-ai>
 +USER=audiomuse-ai
 +DESCRIPTION="Music analyzer"
 +</file>
 +
 +Add the service to the default runlevel and start it now:
 +<code bash>
 +/etc/init.d/user-containers.audiomuse-ai start
 +rc-update  user-containers.audiomuse-ai
 +</code>