Skip to main content

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 .so indicate the version.
  • Note: nvidia-smi shows the maximum CUDA version supported by the driver, not the installed version.
conda install cudatoolkit==11.3
conda install cudnn==8.2
  • Use conda search cudatoolkit to 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)

  1. Visit the NVIDIA CUDA Toolkit Archive to download the required version.
  2. Grant execution permission and install:
chmod +x cuda_xxx.run
./cuda_xxx.run # Install CUDA only, do NOT install the driver
  1. Download cuDNN from: NVIDIA cuDNN

    • After extraction, copy include and lib64 contents to /usr/local/cuda/include/ and /usr/local/cuda/lib64/ respectively:
mv cuda/include/* /usr/local/cuda/include/
chmod +x cuda/lib64/* && mv cuda/lib64/* /usr/local/cuda/lib64/
  1. 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 cudatoolkit takes 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.