WebCal
Ctrl K

मार्गदर्शिका

CUDA/cuDNN

मार्गदर्शिकाएकीकरणसामान्य प्रश्नसहायता
मूल्यब्लॉग
त्वरित प्रारंभTop-Up and BillingAccelerating Access to Academic ResourcesQuick StartIntroductionMaintenance and TroubleshootingNetwork
प्लेटफ़ॉर्मJetBrain ProjectorTmpWebCal Scholars Program @2026Introduction to the Public Beta/Suqian Zone AAbout UsCopying Data Between InstancesAnalysis of Server Performance MetricsTidal Computing PowerLoad Balancing
घरेलू चिप्सUsing Huawei MindIEHuawei Ascend NPUMooreThread GPU
परिवेश सेटअपCUDA/cuDNNMinicondaPython3.XInstalling DependenciesOverviewImages
एंटरप्राइज़ सुविधाएँFlexible DeploymentElastic Deployment Release NotesBest Practices for Elastic DeploymentPerformance Metrics Monitoring
कंटेनर इंस्टेंसJupyterLabRemote SSH ConnectionSave the imageScaling ConfigurationMulti-machine, multi-GPU parallel processingDaemonOverviewChange the billing methodMigration Example (Same Region)Migration ExamplesRemote DesktopReset the system
GPU चुननाGPU SelectionPerformance Testing
डेटाUpload DataDownload DataPublic DataPublic Cloud Storage (Highly Recommended)Compression / DecompressionFile StorageLocal data diskOverview
सर्वोत्तम अभ्यासFileZillaGitGromacsHuggingFaceKataGoLinux BasicsMPIOpenCLPyCharm Remote DevelopmentR (RStudio) InstallationSSH TunnelTensorBoardRemote Development with VSCodeVisdomVulkanXShellOpen PortsWeChat MessagesPerformanceExpose multiple servicesMoney-Saving TipsComputation Precision IssuesSoftware Sources

परिवेश सेटअप

CUDA/cuDNN

30/07/202679852 व्यू

Note: Unless you need to recompile the code, there is generally no need to install CUDA or cuDNN separately, as the framework includes pre-compiled CUDA. The framework version corresponds to the CUDA version, so you only need to pay attention to the framework version; there is no need to manage the CUDA version separately.

Check the default CUDA/cuDNN version

Note: The CUDA version displayed by the nvidia-smi command is only the highest CUDA version supported by the driver; it does not indicate that this specific version of CUDA is installed on the instance.

Run the following command in the terminal to check the CUDA version included with the default image (installation directory is /usr/local/):

# 查询平台内置镜像中的cuda版本
ldconfig -p | grep cuda
        libnvrtc.so.11.0 (libc6,x86-64) => /usr/local/cuda-11.0/targets/x86_64-linux/lib/libnvrtc.so.11.0
        libnvrtc.so (libc6,x86-64) => /usr/local/cuda-11.0/targets/x86_64-linux/lib/libnvrtc.so
        libnvrtc-builtins.so.11.0 (libc6,x86-64) => /usr/local/cuda-11.0/targets/x86_64-linux/lib/libnvrtc-builtins.so.11.0

# 查询平台内置镜像中的cudnn版本
ldconfig -p | grep cudnn
        libcudnn_ops_train.so.8 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8
        libcudnn_ops_train.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so
        libcudnn_ops_infer.so.8 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8
        libcudnn_ops_infer.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so

In the output log above, the number following ".so" is the version number. If you installed CUDA via conda, you can check it using the following command:

conda list | grep cudatoolkit
cudatoolkit               10.1.243             h6bb024c_0    defaults

conda list | grep cudnn
cudnn                     7.6.5                cuda10.1_0    defaults

Installing Other Versions of CUDA/cuDNN

Method 1: Install using conda

Advantages: Simple

Drawback: Header files are generally not included; if compilation is required, you must install it using Method 2.

Method:

conda install cudatoolkit==xx.xx
conda install cudnn==xx.xx

If you're unsure what the version number is, you can search for:

conda search cudatoolkit
Loading channels: done
# Name                       Version           Build  Channel
cudatoolkit                      9.0      h13b8566_0  anaconda/pkgs/main
cudatoolkit                      9.2               0  anaconda/pkgs/main
cudatoolkit                 10.0.130               0  anaconda/pkgs/main
cudatoolkit                 10.1.168               0  anaconda/pkgs/main
cudatoolkit                 10.1.243      h6bb024c_0  anaconda/pkgs/main
cudatoolkit                  10.2.89      hfd86e86_0  anaconda/pkgs/main
cudatoolkit                  10.2.89      hfd86e86_1  anaconda/pkgs/main
cudatoolkit                 11.0.221      h6bb024c_0  anaconda/pkgs/main
cudatoolkit                   11.3.1      h2bc3f7f_2  anaconda/pkgs/main

Method 2: Install by downloading the installation package

CUDA download link: https://developer.nvidia.com/cuda-toolkit-archive

Installation instructions:

# 下载.run格式的安装包后:
chmod +x xxx.run   # 增加执行权限
./xxx.run          # 运行安装包,注意只需要安装cuda,不需要安装驱动等。

cuDNN download link: https://developer.nvidia.com/cudnn

Installation instructions:

First, unzip the files, then place the dynamic link libraries and header files in their respective directories.

mv cuda/include/* /usr/local/cuda/include/
chmod +x cuda/lib64/* && mv cuda/lib64/* /usr/local/cuda/lib64/

After installation, add the following environment variables:

echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:${LD_LIBRARY_PATH} \n" >> ~/.bashrc
source ~/.bashrc && ldconfig

Note:

The default images come with the most up-to-date versions of CUDA and cuDNN pre-installed. If you have installed cudatoolkits or similar software yourself, the system will generally prioritize using the cudatoolkits installed via conda by default,

अगला लेखFileZilla
Compute Rental दस्तावेज़मार्गदर्शिका पर वापस जाएं