Installing demucs on the latest miniconda version is broken as conda is defaulting to numpy>=2.
Some code in the musdb package seems to rely on numpy v1 functionality.
Adding numpy<2 to environment-cuda.yml appears to fix the issue.
To Reproduce
A simple Dockerfile that reproduces the error:
FROM ubuntu:latest
# Get deps for installing miniconda and demucs
RUN apt update -y && apt install wget git soundstretch -y
# Get and install miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py312_24.5.0-0-Linux-x86_64.sh
RUN bash Miniconda3-py312_24.5.0-0-Linux-x86_64.sh -b -p /miniconda3
ENV PATH="/miniconda3/bin:$PATH"
# Make sure base is up to date
RUN conda update -n base conda -y
# Clone and install demucs
RUN git clone https://github.com/facebookresearch/demucs
RUN cd demucs && conda env update -f environment-cuda.yml
RUN cd demucs && conda run -n demucs pip install -e .
# A simple import will trigger the exception
RUN conda run -n demucs python -c "from demucs.wav import Wavset"
# >> AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.
Your Environment
Python and PyTorch version:
Python: 3.9.19
PyTorch: 2.0.1+cu117
Torchaudio: 2.0.2+cu117
Operating system and version (desktop or mobile):
Ubuntu 20.04.1
Hardware (gpu or cpu, amount of RAM etc.):
GPU (RTX 3090)
64 GB RAM
🐛 Bug Report
Installing demucs on the latest miniconda version is broken as conda is defaulting to numpy>=2. Some code in the musdb package seems to rely on numpy v1 functionality.
Adding
numpy<2
toenvironment-cuda.yml
appears to fix the issue.To Reproduce
A simple Dockerfile that reproduces the error:
Your Environment
Python and PyTorch version: Python: 3.9.19 PyTorch: 2.0.1+cu117 Torchaudio: 2.0.2+cu117
Operating system and version (desktop or mobile): Ubuntu 20.04.1
Hardware (gpu or cpu, amount of RAM etc.): GPU (RTX 3090) 64 GB RAM