Skip to content
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

Open
Nykoshiro opened this issue Jan 19, 2021 · 39 comments
Open

Unraid Support? #57

Nykoshiro opened this issue Jan 19, 2021 · 39 comments
Labels
enhancement New feature or request

Comments

@Nykoshiro
Copy link

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.

@JeffreyCA
Copy link
Owner

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/nvidia-docker2).

@Nykoshiro
Copy link
Author

No worries, I'll see if I can figure out how to make the changes needed to make it work. Thank you ~N

@Nykoshiro
Copy link
Author

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
https://youtu.be/KiJ2Tv5lB_A?t=348

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.

@Nykoshiro
Copy link
Author

Nykoshiro commented Oct 27, 2021

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:

  • The instructions on the main page refer to docker-compose.dev.yml, shouldn't this be docker-compose.prod.yml?
  • I used Portainer & a modified version of your docker-compose.gpu.yml (see below)
    • This combined the compose & prod yml files & I had to use EXPOSE for the nginx ports because Unraid uses 80 for itself
  • I modified settings.py & settings_docker.py in the API container to allow the Unraid IP address to open it
  • I noticed you had a self-hosted yml that seemed to only add volume mapping, I may try adding this to the modified yml next.
  • I tried uploading a file but got errors

MODIFIED YML
https://github.com/Nykoshiro/Stuff/blob/main/Docker-Compose.Unraid.yml

@Nykoshiro
Copy link
Author

Nykoshiro commented Oct 28, 2021

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/
Traceback (most recent call last):

File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.7/dist-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python3.7/dist-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python3.7/dist-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/usr/local/lib/python3.7/dist-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/webapp/api/views.py", line 139, in create
source_file = serializer.save()
File "/usr/local/lib/python3.7/dist-packages/rest_framework/serializers.py", line 205, in save
self.instance = self.create(validated_data)
File "/usr/local/lib/python3.7/dist-packages/rest_framework/serializers.py", line 939, in create
instance = ModelClass._default_manager.create(**validated_data)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/query.py", line 453, in create
obj.save(force_insert=True, using=self.db)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/base.py", line 727, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/base.py", line 765, in save_base
force_update, using, update_fields,
File "/usr/local/lib/python3.7/dist-packages/django/db/models/base.py", line 868, in _save_table
results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/base.py", line 908, in _do_insert
using=using, raw=raw,
File "/usr/local/lib/python3.7/dist-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/query.py", line 1270, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/sql/compiler.py", line 1415, in execute_sql
for sql, params in self.as_sql():
File "/usr/local/lib/python3.7/dist-packages/django/db/models/sql/compiler.py", line 1360, in as_sql
for obj in self.query.objs
File "/usr/local/lib/python3.7/dist-packages/django/db/models/sql/compiler.py", line 1360, in
for obj in self.query.objs
File "/usr/local/lib/python3.7/dist-packages/django/db/models/sql/compiler.py", line 1359, in
[self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
File "/usr/local/lib/python3.7/dist-packages/django/db/models/sql/compiler.py", line 1310, in pre_save_val
return field.pre_save(obj, add=True)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/fields/files.py", line 302, in pre_save
file.save(file.name, file.file, save=False)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/fields/files.py", line 89, in save
self.name = self.storage.save(name, content, max_length=self.field.max_length)
File "/usr/local/lib/python3.7/dist-packages/django/core/files/storage.py", line 53, in save
name = self.get_available_name(name, max_length=max_length)
File "/usr/local/lib/python3.7/dist-packages/storages/backends/azure_storage.py", line 219, in get_available_name
return super().get_available_name(name, max_length)
File "/usr/local/lib/python3.7/dist-packages/django/core/files/storage.py", line 87, in get_available_name
while self.exists(name) or (max_length and len(name) > max_length):
File "/usr/local/lib/python3.7/dist-packages/storages/backends/azure_storage.py", line 222, in exists
return self.service.exists(
File "/usr/local/lib/python3.7/dist-packages/storages/backends/azure_storage.py", line 177, in service
connection_string=self.connection_string)
File "/usr/local/lib/python3.7/dist-packages/storages/backends/azure_storage.py", line 167, in _blob_service
endpoint_suffix=self.endpoint_suffix)
File "/usr/local/lib/python3.7/dist-packages/azure/storage/blob/blockblobservice.py", line 150, in init
custom_domain, request_session, connection_string, socket_timeout, token_credential)
File "/usr/local/lib/python3.7/dist-packages/azure/storage/blob/baseblobservice.py", line 213, in init
socket_timeout=socket_timeout)
File "/usr/local/lib/python3.7/dist-packages/azure/storage/common/_connection.py", line 126, in get_service_parameters
raise ValueError(_ERROR_STORAGE_MISSING_INFO)
ValueError: You need to provide an account name and either an account_key or sas_token when creating a storage service.

@JeffreyCA
Copy link
Owner

Yes in settings.py, uncomment or replace the line DEFAULT_FILE_STORAGE = 'api.storage.FileSystemStorage'.

Sorry, I accidentally edited your comment instead of replying to it...

@Nykoshiro
Copy link
Author

Nykoshiro commented Oct 28, 2021

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:

image

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:

image

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?

@JeffreyCA
Copy link
Owner

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.

@Nykoshiro
Copy link
Author

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:

image

D. Mix Creation Error - I modified the default file storage setting and restarted all the containers, it's still not working.

image
image

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')

@Nykoshiro
Copy link
Author

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

@JeffreyCA
Copy link
Owner

Can you access the mp3 from the browser somehow, following the path to the file?

@Nykoshiro
Copy link
Author

Nykoshiro commented Oct 29, 2021

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

image

Mixer has same behavior, web page loads but playback doesn't work due to same 'file not found' error

image

When trying to download a stem, the same file not found error populates.

image

@JeffreyCA
Copy link
Owner

It's expecting the files to be in .../Spleeter/media/separate and .../Spleeter/media/uploads, but you don't seem to have the media folder.

Maybe try changing MEDIA_ROOT in settings.py (to '.' or ''?) or create the folder.

@Nykoshiro
Copy link
Author

Nykoshiro commented Oct 29, 2021

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 '

image

image

image

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

image

Also, would it be beneficial to change the settings.py so folders & url path can be user defined as variables?

MEDIA_ROOT = os.getenv('MEDIA_ROOT', 'media')
MEDIA_URL = os.getenv('MEDIA_URL', '/media/')
SEPARATE_DIR = os.getenv('SEPARATE_DIR', 'separate')
UPLOAD_DIR = os.getenv('UPLOAD_DIR', 'uploads')

@Nykoshiro
Copy link
Author

Nykoshiro commented Oct 29, 2021

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:

  1. Both upload types work (I am getting an error with a specific local file; may be related to a '.fuse_hidden000078ac00000009' file that still exists in one of the separate folders)
  2. Playback of audio for both upload types works on the main page
  3. Creating mixes works
  4. Downloading stems works (but I had to change- MEDIA_URL=:nginxport/media/ as the current release expects you to run nginx on 80)

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.

image

@JeffreyCA
Copy link
Owner

Open up the browser dev console and check the network tab as you load the dynamic mix page, what errors do you see?

@JeffreyCA
Copy link
Owner

I made it easier to set file storage through env variables, see updated README and #101.

@Nykoshiro
Copy link
Author

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

@Nykoshiro
Copy link
Author

Nykoshiro commented Nov 2, 2021

Open up the browser dev console and check the network tab as you load the dynamic mix page, what errors do you see?

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.

@JeffreyCA
Copy link
Owner

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.

@Nykoshiro
Copy link
Author

Nykoshiro commented Nov 3, 2021

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:

  • Dynamic Mix play back doesn't work (CORS Error?; pic 1)
  • Dynamic Mix Stems don't download (URL is missing port; adding port takes me to stem; pic 2)

pic 1
image

pic 2
image

@Nykoshiro
Copy link
Author

Nykoshiro commented Nov 3, 2021

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;
NEW: proxy_set_header Host $http_host;

@Nykoshiro
Copy link
Author

Nykoshiro commented Nov 5, 2021

[CPU Build]

  • Everything seems to work without issue

[GPU Build]
F. Dynamic Mix playback & downloads don't work - tested with local mp3, error screenshots posted above. Changing the nginx.conf file LINE 20: from proxy_set_header Host $host; to proxy_set_header Host $http_host; seems to resolve it (the CPU build doesn't need this modification though; I'm guessing some of the python in the GPU build needs to be reworked for this since the CPU build works accordingly)

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

#Containers may allow for specifying CONTEXT_PATH so the location path works without a rewrite directive

#used for rewrite rule
#location /spleeter {
    #return 301 $scheme://$host/spleeter/;
#}

location ^~ /spleeter {
#location ^~ /spleeter/ {	#use this line instead for rewrite rule

    include /config/nginx/proxy.conf;
    resolver 127.0.0.11 valid=30s;
    set $upstream_app spleeter_nginx;
    set $upstream_port 1111;
    set $upstream_proto http;
    proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    #rewrite /spleeter(.*) $1 break;  #rewrite rule
}

@JeffreyCA
Copy link
Owner

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?

@JeffreyCA JeffreyCA added the enhancement New feature or request label Feb 20, 2022
@dezerving
Copy link

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:

  1. Both upload types work (I am getting an error with a specific local file; may be related to a '.fuse_hidden000078ac00000009' file that still exists in one of the separate folders)
  2. Playback of audio for both upload types works on the main page
  3. Creating mixes works
  4. Downloading stems works (but I had to change- MEDIA_URL=:nginxport/media/ as the current release expects you to run nginx on 80)

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.

image

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!

@Nykoshiro

@Nykoshiro
Copy link
Author

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.

@dezerving
Copy link

dezerving commented Sep 14, 2022

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 /webapp/media/* but after processing files it is for some reason looking for the files in /media/* so it keeps returning resource could not be found even though the files are confirmed to be in /webapp/media.

After seeing the MEDIA_ROOT variable in django_react/settings_docker.py is set to /media I tried changing my volume mounts to /media instead of /webapp/media. This resulted in the inability to even process files. Are the paths hardcoded somewhere because if I'm setting paths here why am I still encountering errors?

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.

@JeffreyCA
Copy link
Owner

Not sure if this helps, but there is some remapping that happens, if you look at docker-compose.prod.selfhost.yml and default.conf.template

@dezerving
Copy link

Not sure if this helps, but there is some remapping that happens, if you look at docker-compose.prod.selfhost.yml and default.conf.template

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.

@dezerving
Copy link

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.

@JeffreyCA
Copy link
Owner

Can you try enabling directory listing on the /media/ location directive and see if it lists any files/folders?

location /media/ {
    alias /webapp/media/;
    autoindex on;
}

@dezerving
Copy link

dezerving commented Sep 15, 2022

Can you try enabling directory listing on the /media/ location directive and see if it lists any files/folders?

location /media/ {
    alias /webapp/media/;
    autoindex on;
}

Okay so I tried that. And with the alias /webapp/media/ it was giving me a 404. image
I messed around and changed it to alias /media/ and it gave me an empty index. image

Weird because I can see there are files located there. I think we're getting somewhere?

@JeffreyCA
Copy link
Owner

Can you try to bash into the NPM container's shell (docker exec -t -i container_name /bin/bash) and see if /media or /webapp/media contain any files?

And how is your Docker Compose config set up for the NPM container? How are you mounting the media volume?

@dezerving
Copy link

dezerving commented Sep 15, 2022

Yes. Here's the exec.
image

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.

version: '3.4'
x-celery-env: &celery-env
  - DJANGO_SETTINGS_MODULE=django_react.settings_docker
  - CELERY_BROKER_URL=redis://redis:6379/0
  - CELERY_RESULT_BACKEND=redis://redis:6379/0
  - CELERY_FAST_QUEUE_CONCURRENCY=${CELERY_FAST_QUEUE_CONCURRENCY:-3}
  - CELERY_SLOW_QUEUE_CONCURRENCY=${CELERY_SLOW_QUEUE_CONCURRENCY:-1}
  - DEFAULT_FILE_STORAGE=FILE
  
services:
  api:
    image: jeffreyca/spleeter-web-backend:${TAG:-latest}
    volumes:
      - /mnt/user/appdata/spleeter/assets:/webapp/frontend/assets
      - /mnt/user/appdata/spleeter/sqlite-data:/webapp/sqlite
      - /mnt/user/appdata/spleeter/staticfiles:/webapp/staticfiles
      - /mnt/user/appdata/spleeter/django_react:/webapp/django_react
      - /mnt/user/downloads/spleeter/media:/webapp/media
    ports:
      - "8000:8000"
    expose: 
      - "8000"
    stdin_open: true
    tty: true
    environment:
      - DJANGO_SETTINGS_MODULE=django_react.settings_docker
      - CELERY_BROKER_URL=redis://redis:6379/0
      - CELERY_RESULT_BACKEND=redis://redis:6379/0
      - APP_HOST=spleeter.domain.com
      - DEFAULT_FILE_STORAGE=FILE
      - ENABLE_CROSS_ORIGIN_HEADERS=1
      - YOUTUBE_API_KEY=<api-key>
    networks:
      - <custom-network>
    restart: always
  celery-fast:
    image: jeffreyca/spleeter-web-backend:${TAG:-latest}
    entrypoint: ./celery-fast-entrypoint.sh
    volumes:
      - /mnt/user/appdata/spleeter/celery-data:/webapp/celery
      - /mnt/user/appdata/spleeter/pretrained-models:/webapp/pretrained_models
      - /mnt/user/appdata/spleeter/sqlite-data:/webapp/sqlite
      - /mnt/user/downloads/spleeter/media:/webapp/media
    environment: *celery-env
    dns:
      - "8.8.8.8"
    networks:
      - <custom-network>
    restart: always
  celery-slow:
    image: jeffreyca/spleeter-web-backend:${TAG:-latest}
    entrypoint: ./celery-slow-entrypoint.sh
    volumes:
      - /mnt/user/appdata/spleeter/celery-data:/webapp/celery
      - /mnt/user/appdata/spleeter/pretrained-models:/webapp/pretrained_models
      - /mnt/user/appdata/spleeter/sqlite-data:/webapp/sqlite
      - /mnt/user/downloads/spleeter/media:/webapp/media
      - /mnt/user/downloads/spleeter/media:/media
    environment: *celery-env
    networks:
      - <custom-network>
    restart: always
  frontend:
    image: jeffreyca/spleeter-web-frontend:${TAG:-latest}
    volumes:
      - /mnt/user/appdata/spleeter/assets:/webapp/frontend/assets
      - /mnt/user/downloads/spleeter/media:/webapp/media
      - /mnt/user/downloads/spleeter/media:/media
    stdin_open: true
    networks:
      - <custom-network>
    restart: "no"
    tty: true
networks:
  <custom-network>:
    external: true

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.

@JeffreyCA
Copy link
Owner

How about the Docker-Compose config for the nginx proxy manager service?

@dezerving
Copy link

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: /mnt/user/downloads/spleeter/media/ and /mnt/user/downloads/spleeter/staticfiles/.

@acidrs03
Copy link

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?

@gknoop
Copy link

gknoop commented Apr 5, 2024

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.

@JeffreyCA @Nykoshiro @dezerving

@dezerving
Copy link

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?

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.

@JeffreyCA @Nykoshiro @dezerving

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants