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

Docker command example not working #92

Closed
dts350z opened this issue Jul 14, 2021 · 3 comments
Closed

Docker command example not working #92

dts350z opened this issue Jul 14, 2021 · 3 comments

Comments

@dts350z
Copy link

dts350z commented Jul 14, 2021

🐛 Bug

The docker command listed on the github homepage fails with RuntimeError: Error loading audio file: failed to open file umx

To Reproduce

Steps to reproduce the behavior:

T>docker run -v ~/Music/:/data -it faroit/open-unmix-pytorch umx "/data/track1.wav" --outdir /data/track1
Using cpu
Downloading: "https://zenodo.org/api/files/1c8f83c5-33a5-4f59-b109-721fdd234875/vocals-b62c91ce.pth" to /root/.cache/torch/hub/checkpoints/vocals-b62c91ce.pth
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.0M/34.0M [00:04<00:00, 8.69MB/s]
Downloading: "https://zenodo.org/api/files/1c8f83c5-33a5-4f59-b109-721fdd234875/drums-9619578f.pth" to /root/.cache/torch/hub/checkpoints/drums-9619578f.pth
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.0M/34.0M [00:04<00:00, 8.30MB/s]
Downloading: "https://zenodo.org/api/files/1c8f83c5-33a5-4f59-b109-721fdd234875/bass-8d85a5bd.pth" to /root/.cache/torch/hub/checkpoints/bass-8d85a5bd.pth
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.0M/34.0M [00:05<00:00, 6.65MB/s]
Downloading: "https://zenodo.org/api/files/1c8f83c5-33a5-4f59-b109-721fdd234875/other-b52fbbf7.pth" to /root/.cache/torch/hub/checkpoints/other-b52fbbf7.pth
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.0M/34.0M [00:04<00:00, 8.02MB/s]
formats: can't open input file `umx': No such file or directory
Traceback (most recent call last):
File "/opt/conda/bin/umx", line 8, in
sys.exit(separate())
File "/opt/conda/lib/python3.8/site-packages/openunmix/cli.py", line 160, in separate
audio, rate = data.load_audio(input_file, start=args.start, dur=args.duration)
File "/opt/conda/lib/python3.8/site-packages/openunmix/data.py", line 58, in load_audio
sig, rate = torchaudio.load(path)
File "/opt/conda/lib/python3.8/site-packages/torchaudio/backend/sox_io_backend.py", line 152, in load
return torch.ops.torchaudio.sox_io_load_audio_file(
RuntimeError: Error loading audio file: failed to open file umx

Expected behavior

I can see it complaining about not loading an audio file, at least while I figure out how the syntax applies to WINDOWS and docker, but it seems to be complaining about loading umx so perhaps a typo in the docker command?

Environment

Docker on Windows 10.

Please add some information about your environment

This stuff shouldn't be relevant for docker, yeah?

  • PyTorch Version (e.g., 1.2):
  • OS (e.g., Linux):
  • torchaudio loader (y/n):
  • Python version:
  • CUDA/cuDNN version:
  • Any other relevant information:

If unsure you can paste the output from the pytorch environment collection script
(or fill out the checklist below manually).

You can get that script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

Additional context

@faroit
Copy link
Member

faroit commented Jul 14, 2021

@dts350z maybe i should have documented this better, the docker entrypoint is umx (see here: https://github.com/sigsep/open-unmix-pytorch/blob/master/Dockerfile#L15) so you would probably be able to run the model using just

docker run -v ~/Music/:/data -it faroit/open-unmix-pytorch "/data/track1.wav" --outdir /data/track1

@dts350z
Copy link
Author

dts350z commented Jul 14, 2021

It does seem to work if you just remove the string "umx" from the command.

T>docker run -v "D:\Glenn\Music\data":/data -it faroit/open-unmix-pytorch "/data/track1.wav" --outdir /data/track1
Using cpu
Downloading: "https://zenodo.org/api/files/1c8f83c5-33a5-4f59-b109-721fdd234875/vocals-b62c91ce.pth" to /root/.cache/torch/hub/checkpoints/vocals-b62c91ce.pth
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.0M/34.0M [00:04<00:00, 8.78MB/s]
Downloading: "https://zenodo.org/api/files/1c8f83c5-33a5-4f59-b109-721fdd234875/drums-9619578f.pth" to /root/.cache/torch/hub/checkpoints/drums-9619578f.pth
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.0M/34.0M [00:04<00:00, 8.86MB/s]
Downloading: "https://zenodo.org/api/files/1c8f83c5-33a5-4f59-b109-721fdd234875/bass-8d85a5bd.pth" to /root/.cache/torch/hub/checkpoints/bass-8d85a5bd.pth
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.0M/34.0M [00:03<00:00, 9.29MB/s]
Downloading: "https://zenodo.org/api/files/1c8f83c5-33a5-4f59-b109-721fdd234875/other-b52fbbf7.pth" to /root/.cache/torch/hub/checkpoints/other-b52fbbf7.pth
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 34.0M/34.0M [00:03<00:00, 9.16MB/s]
/opt/conda/lib/python3.8/site-packages/openunmix/transforms.py:204: UserWarning: torchaudio.functional.functional.complex_norm has been deprecated and will be removed from future release. Please convert the input Tensor to complex type with torch.view_as_complex then use torch.abs. Please refer to pytorch/audio#1337 for more details about torchaudio's plan to migrate to native complex type.
spec = torchaudio.functional.complex_norm(spec, power=self.power)

@faroit
Copy link
Member

faroit commented Jul 15, 2021

@dts350z i corrected the readme in 21c5ba

thanks for reporting

@faroit faroit closed this as completed Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants