Prerequisites and Installation

Prerequisites

Spiking-FullSubNet is built on top of PyTorch and provides standard audio signal processing and deep learning tools.

  • Python: >= 3.10

  • uv: We recommend using uv as the package manager for faster and more reliable dependency management.

Installation

Option 2: Using Conda + pip

If you prefer Conda, you can still use the traditional approach:

  1. Create a Conda environment:

    conda create --name spiking-fullsubnet python=3.10
    conda activate spiking-fullsubnet
    
  2. Install PyTorch:

    conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
    
  3. Install the project:

    git clone https://github.com/haoxiangsnr/spiking-fullsubnet.git
    cd spiking-fullsubnet
    pip install -e .
    

Common uv Commands

uv sync                    # Sync dependencies from lockfile
uv sync --extra gpu        # Include GPU dependencies
uv sync --all-extras       # Include all optional dependencies
uv add <package>           # Add a new dependency
uv lock --upgrade          # Upgrade all dependencies
uv run <command>           # Run a command in the virtual environment
uv build                   # Build the package

Tip

  • uv is significantly faster (10~100x) than pip and handles dependency resolution more reliably.

  • The uv.lock file ensures reproducible installations across different machines.

  • Use uv run python script.py to run scripts without manually activating the environment.