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

Build on colab fails at cell 2 due to failed audiocraft install #161

Open
Mycohl opened this issue Oct 2, 2024 · 1 comment
Open

Build on colab fails at cell 2 due to failed audiocraft install #161

Mycohl opened this issue Oct 2, 2024 · 1 comment

Comments

@Mycohl
Copy link

Mycohl commented Oct 2, 2024

Steps to repro:

  1. Open either colab
  2. Click to run the first cell
  3. Click to run the second cell

Result:

INFO: pip is looking at multiple versions of scipy to determine which version is compatible with other requirements. This could take a while.
  Downloading scipy-1.7.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.2 kB)
  Downloading scipy-1.6.1.tar.gz (27.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 27.3/27.3 MB 67.0 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  Downloading scipy-1.6.0.tar.gz (27.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 27.3/27.3 MB 36.7 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  Downloading scipy-1.5.4.tar.gz (25.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 25.2/25.2 MB 38.8 MB/s eta 0:00:00
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Expected:
Audiocraft should install, and then voicecraft should be cloned

NOTE: This repo also doesn't build locally or in a docker container. Clown shoes.

According to https://github.com/facebookresearch/audiocraft, audiocraft requires python 3.9, but the colab is set up with python 3.10.

After some googling, apparently google just decides to force-update the python version? And there's no way to downgrade? There's a Medium article where the author claims they tested it on 3.10 and it worked, though.

I was able to get audiocraft installed by manually installing the requirements separately and using --no-dependencies. It appears that there are several packages which break pip's dependency mechanism.

!pip install "av==11.0.0" "einops" "flashy>=0.0.1" "hydra-core>=1.1" "hydra_colorlog" "julius" "num2words" 
!pip install "numpy<2.0.0" "sentencepiece" "spacy>=3.6.1" "torch==2.1.0" "torchaudio>=2.0.0,<2.1.2" "huggingface_hub" 
!pip install "tqdm" "transformers>=4.31.0" "xformers<0.0.23" "demucs" "scipy"
!pip install "soundfile"  "torchmetrics" "protobuf" "torchtext==0.16.0" "pesq" "pystoi"
!pip install "librosa" "gradio" "encodec" 

!pip install --no-dependencies -U git+https://[email protected]/facebookresearch/audiocraft#egg=audiocraft

I can't test whether it actually works at this point, because I spent so long trying to get python set up that google cut me off from GPU usage.

Maybe this isn't your problem, but your code is broken. It will not run. If you actually want people to use it, perhaps you should take this seriously?

@subasine1
Copy link

Hello @Mycohl,
It's actually in the inference notebook that was shared.
You can find the link here: https://colab.research.google.com/drive/1lch_6it5-JpXgAQlUTRRI2z2_rk5K67Z?usp=sharing#scrollTo=JazYj0Xek8TA

Since installing audiocraft breaks due to no config, move the default into site-packages
!git clone https://github.com/facebookresearch/audiocraft.git
!mv audiocraft/config /usr/local/lib/python3.10/site-packages/
!rm -rf audiocraft

Have a nice day

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