CUDA/cuDNN Versions and Installation Guide
The aifare platform images come pre-installed with mainstream CUDA/cuDNN versions, so most users do not need to install them manually. If you need to customize CUDA/cuDNN versions, refer to the methods below.
Built-in Platform Instructions
- Framework images are already matched with compatible CUDA/cuDNN versions; no additional installation is required.
- Only necessary to customize CUDA/cuDNN in cases like secondary compilation or special requirements.
Check Current CUDA/cuDNN Version
# Check CUDA version (based on /usr/local/ directory)
ldconfig -p | grep cuda
# Check cuDNN version
ldconfig -p | grep cudnn
- The numbers after
.soindicate the version. - Note:
nvidia-smishows the maximum CUDA version supported by the driver, not the installed version.
Install CUDA/cuDNN via Conda (Recommended for Simple Use Cases)
conda install cudatoolkit==11.3
conda install cudnn==8.2
- Use
conda search cudatoolkitto view available versions. - Conda-installed CUDA typically lacks header files, making it unsuitable for compiling code.
Manual Installation via Installer (For Header Files/Compilation Needs)
- Visit the NVIDIA CUDA Toolkit Archive to download the required version.
- Grant execution permission and install:
chmod +x cuda_xxx.run
./cuda_xxx.run # Install CUDA only, do NOT install the driver
-
Download cuDNN from: NVIDIA cuDNN
- After extraction, copy
includeandlib64contents to/usr/local/cuda/include/and/usr/local/cuda/lib64/respectively:
- After extraction, copy
mv cuda/include/* /usr/local/cuda/include/
chmod +x cuda/lib64/* && mv cuda/lib64/* /usr/local/cuda/lib64/
- Add environment variables and refresh:
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:${LD_LIBRARY_PATH}" >> ~/.bashrc
source ~/.bashrc && ldconfig
Common Issues
- Conda-installed
cudatoolkittakes precedence over system CUDA; it's recommended to use only one method. - Platform images include native CUDA/cuDNN; prefer using the platform-provided environment.
- For multiple CUDA versions, manually manage environment variables to avoid conflicts.
For more CUDA/cuDNN configuration tips, please refer to the aifare platform documentation or community resources.