Files
railseek6/cuda_11.8_installation_guide.md

64 lines
2.1 KiB
Markdown

# CUDA 11.8 and cuDNN 8.x Installation Guide for PaddleOCR GPU Support
## Current Issue
PaddlePaddle 2.6.0 is compiled for CUDA 11.8, but the system has CUDA 12.9 installed, causing cuDNN version detection failures.
## Installation Steps
### 1. Download CUDA 11.8
**Download Link**: https://developer.nvidia.com/cuda-11-8-0-download-archive
**Windows Installation**:
- Select: Windows → x86_64 → 10/11 → exe (local)
- File: `cuda_11.8.0_522.06_windows.exe`
### 2. Download cuDNN 8.x for CUDA 11.8
**Download Link**: https://developer.nvidia.com/rdp/cudnn-archive
**Requirements**:
- cuDNN v8.9.7 for CUDA 11.x (or latest 8.x version)
- NVIDIA Developer Account required (free)
### 3. Installation Steps
#### Install CUDA 11.8:
1. Run the CUDA 11.8 installer
2. Choose "Custom" installation
3. Keep default components selected
4. Install to default location: `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8`
#### Install cuDNN:
1. Extract the cuDNN zip file
2. Copy these files to CUDA 11.8 directory:
- `bin\cudnn64_8.dll``C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\`
- `include\cudnn*.h``C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include\`
- `lib\x64\cudnn*.lib``C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\lib\x64\`
### 4. Update Environment Variables
**System Environment Variables**:
- `CUDA_PATH`: `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8`
- `CUDA_HOME`: `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8`
**Update PATH**:
- Add: `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin`
- Add: `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\libnvvp`
### 5. Verification
After installation, run:
```bash
python check_cuda_cudnn.py
```
## Alternative: Use CPU-Only Mode (Temporary)
If CUDA 11.8 installation is not possible immediately, use CPU mode:
```bash
set CUDA_VISIBLE_DEVICES=-1
set PADDLE_OCR_USE_GPU=False
```
## Notes
- Multiple CUDA versions can coexist on the same system
- Environment variables determine which CUDA version is used
- Restart system after CUDA/cuDNN installation
- PaddlePaddle 2.6.0 requires CUDA 11.8 specifically