-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unraid Support? #57
Comments
Hi, I've never used Unraid and TBH don't know anything about it, so I'm not sure what needs to be done to support it. The app should run on any platform that supports Docker and GPU acceleration (through something like NVIDIA container toolkit/ |
No worries, I'll see if I can figure out how to make the changes needed to make it work. Thank you ~N |
Hi Jeffrey, I figured I would give this a second try since I have a lot of time right now. Unraid has native GPU support for Docker containers (e.g Emby, Plex) by adding an environment variable for your gpu. Unraid: Installing apps from DockerHub Since SpleeterWeb uses multiple containers, I decided to install Portainer in Unraid and refer to both YML files in the stacks section. I tried both the cpu & gpu ymls w/ the dev one & nothing came up on port 8000. I validated Portainer works in Unraid by pasting in the compose yml from https://github.com/linuxserver/docker-beets and the app was available on the exposed port. If you don't have any time for this, I totally understand; any guidance and/or help standardizing spleeter-web would be much appreciated. I can help with whatever is needed from the Unraid side. |
I'm pretty sure none of this is best practice, but I finally made some progress. I believe I got the app running and loading inside of Unraid using Portainer. This is not ideal as running it from DockerHub natively in Unraid would be much cleaner. Here's the changes I made to get it at least loading in the browser:
MODIFIED YML |
API Container - error uploading a file, does Spleeter-Web require external storage configurations to handle file uploads? Is there a configuration I can change to use local storage instead? 2021-10-28 01:55:18,713 [django.request][ERROR]: Internal Server Error: /api/source-file/file/ |
Yes in Sorry, I accidentally edited your comment instead of replying to it... |
A. update: I'm assuming nginx isn't required for self hosting, the container is stopped and I can access port 8000 still via Unraid (which uses nginx as its frontend I think). B. Local Storage - oof, I can't believe I missed that on the main page; modified the settings files, copied them back into the container, restarted the container, & now I can upload files. Trying to create a mix opens a new browser tab with error: You need to provide an account name and either an account_key or sas_token when creating a storage service. Checking the celery_slow container I see the following error: C. I added an api for yt; after adding a url & clicking next, I get a red x error about 'directory not empty' before I can create a mix. Checking the celery_fast container I see the following error: D. I'm assuming that I can set storage configuration in the x-celery-env: &celery-env block of the yml file without having to modify the configuration files after creating the containers? Seems like everything in the settings.py with os.getenv('VARIABLE','default value') can be configured at the time of creation, is that correct? |
You'll need to restart the other celery containers as they're still referencing the old settings configuration. C might be related to that. Yes you're right for A and D. |
C. YT Error Dir not empty - this error was happening before I modified the settings.py/settings_docker.py. For the sake of testing, I deployed the CPU variant of containers with only the api key & the error I get is now the same as D. I modified the django settings files to use local file storage and restarted all the containers. Here's log from celery_fast: D. Mix Creation Error - I modified the default file storage setting and restarted all the containers, it's still not working. Is it possible that after the containers are created they no longer refer to or apply changes from the django settings file? Would it be a good idea/possible to change default file storage in the settings files so it can be user defined at the time of creation? DEFAULT_FILE_STORAGE = os.getenv('DEFAULT_FILE_STORAGE', 'api.storage.AzureStorage') |
C & D are now fixed; I realized that 3 containers are created from the same image. This required me to update the settings files in all 3 containers (e.g. api, celery_slow, celery_fast). If possible, it might be beneficial to use os.getenv with the DFS. E. External (yt) playback not working - I can see the files on my local storage, I can the stems it created but audio playback fails because of a file not found error (e.g. the web page doesn't play audio & the mixer page play button just spins) I also tried a download link & got a 'requested resource was not found on server' error. This was the only error I could find in all the containers. 2021-10-28 07:53:20,343 [django.request][WARNING]: Not Found: /media/separate/dd706e24-53ee-44ec-9e5e-884dd65f038c/filename (vocals) [256 kbps,spleeter].mp3 |
Can you access the mp3 from the browser somehow, following the path to the file? |
Files created, they're in the correct path & play back fine outside of the webpage. On the main SW page, the play button changes to pause, the player loads at the bottom, but nothing happens Mixer has same behavior, web page loads but playback doesn't work due to same 'file not found' error When trying to download a stem, the same file not found error populates. |
It's expecting the files to be in Maybe try changing |
I believe I had everything configured properly? I just removed the path in the screenshots above (see below); I thought path was correct as the Spleeter folder is created on my host when I bring up the containers. SW seems to know where to place the files as well. Maybe the path is confusing to me... I've tried switching MEDIA_ROOT to ' ' / ' . ' / ' webapp/media ' I noticed that the container had an empty media folder off the root which I'm guessing the settings.py creates? I changed the path to point to 'webapp/media' since that is the container volume bound to my host path. It still didn't work... 2021-10-29 06:27:34,948 [django.request][WARNING]: Not Found: /webapp/media/uploads/a8510851-36a2-4f2b-8c71-53134a32934f/Anderson .Paak - Ventura - 07 - King James.mp3 Also, would it be beneficial to change the settings.py so folders & url path can be user defined as variables?
|
E. is now fixed; since there was no nginx container, Unraid didn't know how to handle the requests for files and where to find them. I added the nginx container back in to the compose yaml which is also mapped to the same host volume as the other containers and gave it a custom port. I did have to copy in a new nginx.conf to the conf.d folder so nginx would listen on the same port published by the container. Some initial testing:
F. Mixer Audio Playback doesn't work (Dynamic Mix) - I checked all the containers and I don't see any errors. The mixer page play button just circles forever. The delete / download buttons work. I noticed that Static Mix works and audio playback for those single stems works. When opening the mixer page for a track, the nginx container shows these 2 lines in the log. |
Open up the browser dev console and check the network tab as you load the dynamic mix page, what errors do you see? |
I made it easier to set file storage through env variables, see updated README and #101. |
I see the update, I did some testing and it seems to be working. I appreciate the update to making SW easier to configure, Thank you |
Dev Console shows CORS ERROR. I reviewed the readme & common problems page; do I need to enable CORS in the nginx container? I tried adding 'add_header Access-Control-Allow-Origin *;' to the location blocks of the nginx.conf inside the nginx container but it didn't help. I've never had to enable CORS in Nginx before so I'm pretty sure I'm doing something wrong. Here's the CORS error; something else I noticed is that the first URL is missing the associated port number for the docker container. If I paste that URL and add the port I can get to the file. If I add the port to the MEDIA_URL (e.g. :port/media/) variable then the download works but then the static mixes DL urls become [IP:port:port]. Access to fetch at 'http://<unraid's IP>/media/separate/ef55d66c-0f30-403b-a5d5-0798c491ba43/Roscoe%20-%20Get%20Low%20(vocals)%20%5B256%20kbps%2Cspleeter%5D.mp3' from origin 'http://<unraid's IP>:<port#>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. |
Thanks, I found the issue and fixed it in #102. You shouldn't need to prepend the port to MEDIA_URL with this change now. |
To clarify in the event that I'm creating chaos, I 'was' adding the port to MEDIA_URL (if I recall) when I wasn't using your nginx container. The reason was because the download buttons for static mix stems were missing the port number. Once I started using your nginx container as the front end it resolved that issue & a few others. The current YML I'm using is here for reference: https://github.com/Nykoshiro/Stuff/blob/main/Docker-Compose.Unraid.yml The 2 pending issues are:
|
F. FIXED (I think) Seems like I fixed the CORS errors & download links by changing the nginx.conf file LINE 20: OLD: proxy_set_header Host $host; |
[CPU Build]
[GPU Build] G. Webm separation doesn't work - Adding a YT url pulls a file but any separating fails. I realized I tested this before when I had the CPU build in; once I got things working I never re-tested on the GPU build because I encountered download errors with local files. I tried to upload a local webm file which worked, but then separating stems fails. H. Reverse proxy to Spleeter Web doesn't work - all of my docker services are behind niginx and I use simple reverse proxy configs. I can't seem to figure out a proper configuration to get SW external facing. Sample of a proxy config
|
Can you post the error from Docker containers for G? And can you check if the docker files you're using for CPU and GPU have the same changes? |
Hey I am struggling with part E. I have basically everything working aside from being able to actually listen on the webapp. All the files are created. How were you able to solve this? I have nginx proxy manager running already so I am not including nginx in my yaml. What am I doing wrong? I would appreciate your help. Thank you! |
I'm running nginx as well with proxy but this app still needed nginx to handle it's own requests. (For simplicity within Unraid) Without it, 'I think' you would have to have some complex proxy configs. I believe there are other standardized Unraid apps that run a basic config of nginx to handle their front end and you just need to proxy to them. E.g. nextcloud I wish I knew what was needed to better standardized for Unraid so I didn't have to mess with portainer. Now that there's other interest, I'll see if I can start this project back up. The solo grind got to me and I needed a break. |
Yeah absolutely would be nice if we could get this working. I think there is an issue where media is stored (and referenced) in the container. Docs say it should be in After seeing the Also with nginx, why does this need nginx at all for local use? Why can't I just use my own, already running, reverse proxy (nginx proxy manager) to proxy requests (and I've already added the subdomain spleeter.domain.com to settings_docker.py). It is accessible at spleeter.domain.com. Oh and also for unraid, install docker-compose from the app store. That's what I'm using. Makes it easier and integrates right into the docker tab. I don't use portainer anymore. |
Not sure if this helps, but there is some remapping that happens, if you look at |
I did see that. I'm wondering if it's possible to just add that bit to my existing nginx proxy manager proxy for spleeter as a custom config. |
Just wanted to leave this here in case anyone else wants to follow along. I've tried essentially everything but I just can't seem to get it to work with my working nginx proxy manager on unraid. Everything works (reverse proxy, processing, etc) besides actually getting the files to play in the webpage and downloading from the webpage. The files are uploaded, separated... everything. I verified that the container can see/edit the files and it definitely can because they do get deleted from my filesystem when I delete them from the webpage. Nginx proxy manager just can't seem to point to them when needed. I raised an issue on their repo to try and get some people smarter than me to try and weigh in. If anyone wants to follow along/help troubleshoot feel free: NginxProxyManager/nginx-proxy-manager#2264 Not a total deal breaker as I have constant access to the server but for remote work it is a bit annoying not being able to download right from the page. |
Can you try enabling directory listing on the
|
Can you try to bash into the NPM container's shell ( And how is your Docker Compose config set up for the NPM container? How are you mounting the media volume? |
Searched a 1 second video for speedy testing. Shows up in the container. Here's my compose yaml file. Warning, it is pretty big and very unraid oriented but I'll try and explain anything you might have questions about.
Redis is already running on my system so I am making use of that (and it is working like a charm). I bound all the volumes to host volumes (for ease of backup on unraid since I can just bundle the whole appdata folder weekly). I don't think I made any mistakes in doing so but let me know if there's anything that may look wrong in that section. |
How about the Docker-Compose config for the nginx proxy manager service? |
Oh wow, thank you for this. I had given up as I was burnt out trying different things. I ended up looking at the NPM container and I had not mapped the media and staticfiles folder correctly for that container. For reference, my NPM config now has them mapped correctly: |
Just came across this and wanted to see if there is any guide for correct implementation of this in Unraid based on the testing and finding from this thread? |
Also secondarily bumping this for the same reason. I've been scratching my head, trying to figure out how to get it running with the help of Docker Compose Manager. |
Not sure about any guide for Unraid but with everything shown above, you should be able to get things working. I don't plan on making a guide as I've switched to UVR on a local Macbook since it's easier for my use case (creating remix/mashups - which is done on the MBP anyway). |
Any chance you might be able to add Unraid Support in the future?
I was interested in testing this in Unraid with GPU Support. I'm already using a GPU for encoding with Emby in Unraid and thought I might be able to add this in there.
The text was updated successfully, but these errors were encountered: