[Bug] Model download URL points to wrong location when splitting on Github Actions runner
- Dominant language
- Python
- Stars
- 28.4k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
- [x] I didn't find a similar issue already open.
- [x] I read the documentation (README AND Wiki)
- [x] I have installed FFMpeg
- [x] My problem is related to Spleeter only, not a derivative product (such as Webapplication, or GUI provided by others)
## Description
Any attempt to run `spleeter` on a [Github Actions runner](https://github.com/features/actions) results in a 404 GET failure at the step for downloading the pre-trained model from spleeter's URL (https://github.com/deezer/spleeter/releases).
Instead, the job attempts to fetch the pretrained model from the current Github repo's URL (https://github.com/my-org/myrepo/releases) , which is non-existent, and returns a `404 Not Found`.

## Root Cause
Spleeter uses the [following environment variables(https://github.com/deezer/spleeter/blob/master/spleeter/model/provider/github.py#L88-L90) for building the fetch URL for its pre-trained, published models:
* `GITHUB_HOST`
* `GITHUB_REPOSITORY`
* `GITHUB_RELEASE`
Unfortunately, `GITHUB_REPOSITORY` is [a reserved environment variable](https://docs.github.com/en/actions/learn-github-actions/environment-variables#:~:text=GITHUB_REPOSITORY,Hello%2DWorld.) in the context of Github Actions, and gets picked up at runtime, resulting in an incorrect destination model URL.
## Solution Options
One alternative is to explicitly set `GITHUB_REPOSITORY` at the time of invocation of spleeter.
```
$ GITHUB_REPOSITORY="deezer/spleeter" poetry run python lib/stem_split.py
```
However, this could introduce undesired side-effects in the Github Action by overriding what should be the original expected value that's set by the environment by default.
A more appropriate solution would be to make the internal usage of spleeter-specific Github environment variables even more distinct, than the current, generic, conflicting names.
## Environment
| | |
| ----------------- | ------------------------------- |
| OS | Linux |
| Installation type | poetry |
| RAM available | plenty |
| Hardware spec | CPU |
Contributor guide
Research direction
Start in spleeter/model/provider/github.py, where GITHUB_HOST, GITHUB_REPOSITORY, and GITHUB_RELEASE are used to build the pretrained-model URL. Review the invocation shown in lib/stem_split.py and reproduce the download on a GitHub Actions runner. Done means the model URL still targets the Spleeter releases when GitHub Actions variables are present, without overriding the runner's environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python
- Domain
- devops, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100