Skip to content

[Docs] How I Got MMCV to Build on RTX 5090 (CUDA 12.8) #3327

@YuchenZHANG2

Description

@YuchenZHANG2

📚 The doc issue

I had some trouble installing MMCV on my RTX 5090 at first, but I was eventually able to get it working. I’m sharing the steps that worked for me below and hope this helps anyone facing similar issues.

Suggest a potential alternative/fix


# Create environment
conda create -n mmcv_py310 python=3.10 -y
conda activate mmcv_py310

# Install PyTorch (CUDA 12.8)
pip install torch torchvision torchaudio \
  --index-url https://download.pytorch.org/whl/cu128

# Install CUDA compiler + toolkit (12.8)
conda install -c nvidia cuda-nvcc=12.8 -y
conda install -c nvidia cuda-toolkit=12.8 -y

# Set CUDA paths (for conda CUDA layout)
export CUDA_HOME=$CONDA_PREFIX
export CUDACXX=$CONDA_PREFIX/bin/nvcc
export CPATH=$CONDA_PREFIX/targets/x86_64-linux/include:$CPATH
export LIBRARY_PATH=$CONDA_PREFIX/targets/x86_64-linux/lib:$LIBRARY_PATH

# Clone mmcv 
git clone https://github.com/open-mmlab/mmcv.git
cd mmcv
pip install -r requirements/optional.txt

# Clean previous build (if any)
rm -rf build mmcv.egg-info

# Build mmcv from source
MAX_JOBS=1 python setup.py develop

# Verify installation
python .dev_scripts/check_installation.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions