馃摎 The doc issue
Build MMCV 2.1.0 from Source on Windows (RTX 50 Series / CUDA 12.8)
This guide documents how I successfully built MMCV from source on Windows for an RTX 5060 Ti.
Environment
| Component |
Version |
| OS |
Windows 11 |
| Python |
3.10.20 |
| CUDA Toolkit |
12.8 |
| PyTorch |
2.7.1+cu128 |
| GPU |
NVIDIA RTX 5060 Ti 16GB |
| Visual Studio |
Build Tools 2022 |
| MSVC |
v142 (14.29) |
| Ninja |
latest |
1. Install Visual Studio Build Tools
Make sure these are installed:
- MSVC v142 - VS 2019 C++ x64/x86 build tools
- Windows 10/11 SDK
- C++ CMake tools
- Ninja
2. Clone MMCV
git clone https://github.com/open-mmlab/mmcv.git
cd mmcv
git checkout v2.1.0
# 3. Install Python dependencies
```bash
pip install -r requirements/runtime.txt
pip install -r requirements/build.txt
pip install "setuptools<81" wheel
4. Open the correct Developer Command Prompt
Use the x64 Native Tools Command Prompt or run:
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.29
Verify:
Expected:
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.xxxxx
5. Activate your conda environment
conda activate mmdetection
6. Set environment variables
Command Prompt:
set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8
set MMCV_WITH_OPS=1
set MAX_JOBS=4
set DISTUTILS_USE_SDK=1
set TORCH_CUDA_ARCH_LIST=12.0
PowerShell equivalent:
$env:CUDA_HOME="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8"
$env:MMCV_WITH_OPS="1"
$env:MAX_JOBS="4"
$env:DISTUTILS_USE_SDK="1"
$env:TORCH_CUDA_ARCH_LIST="12.0"
7. Build MMCV
pip install . -v --no-build-isolation
The build takes several minutes.
8. Verify installation
import mmcv
import mmcv._ext
print(mmcv.__version__)
Suggest a potential alternative/fix
No response
馃摎 The doc issue
Build MMCV 2.1.0 from Source on Windows (RTX 50 Series / CUDA 12.8)
This guide documents how I successfully built MMCV from source on Windows for an RTX 5060 Ti.
Environment
1. Install Visual Studio Build Tools
Make sure these are installed:
2. Clone MMCV
4. Open the correct Developer Command Prompt
Use the x64 Native Tools Command Prompt or run:
Verify:
Expected:
5. Activate your conda environment
6. Set environment variables
Command Prompt:
PowerShell equivalent:
7. Build MMCV
pip install . -v --no-build-isolationThe build takes several minutes.
8. Verify installation
Suggest a potential alternative/fix
No response