当前位置:网站首页>[AI server setup] CUDA environment
[AI server setup] CUDA environment
2022-07-01 19:42:00 【blanklog】
be based on Ubuntu 18.04 System
One 、 install Nvidia drive
The basis of using graphics card , Use it directly ubuntu Warehouse installation
1. First, check the available drivers of the graphics card
ubuntu-drivers devices2. Install recommended drive
sudo apt install nvidia-driver-470-server3. Check to see if the installation was successful
nvidia-smi
Reference resources :Ubuntu Lower installation NVIDIA Three methods of driving _Willard Leozi The blog of -CSDN Blog _ubuntunvidia Drive installation official GeForce The driver | NVIDIA
Two 、 CUDA Environmental installation
Most of the AI The framework passes cuda api To use NVIDIA graphics card for high-performance computing ,cuda Developer website .
1. Go to CUDA Toolkit Post a journal Check the driver support cuda edition

2. Go to Historical release version Find what you need CUDA Version installed
Complete the installation according to the tutorial given on the official website

3. CUDA Environment variable configuration
If you only configure editing for the current user ~/.bashrc Add at the end
If it is configured for all users : stay /etc/profile.d/ New under the directory cuda11.4_env.sh And add
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH4. Test for successful installation
cuda There are some in the installation directory samples Program , You can try to compile and run .
cd /usr/local/cuda/samples/1_Utilities/deviceQuery
sudo make clean
sudo make -j8
./deviceQuery3. About unloading methods
CUDA Installation guide There is an unloading method in

3、 ... and 、 install cuDNN
cuDNN Is based on GPU Accelerated AI Operator Library .
1. First go cuDNN Website Create an account , Then go to Historical release Download corresponding in cuda Version of cuDNN library .

2. Unzip and download the installation package
Get one "cuda/" Catalog
tar xvf cudnn-11.4-linux-x64-v8.2.4.15.tgz3. install
Namely the cuda The contents of the directory are installed into the CUDA Toolkit In the installation directory of .
# Copy cudnn The header file
sudo cp cuda/include/* /usr/local/cuda-11.4/include/
# Copy cudnn The library of
sudo cp cuda/lib64/* /usr/local/cuda-11.4/lib64/
# Add... To all users cudnn.h Access rights of
sudo chmod a+r /usr/local/cuda-11.4/include/cudnn.h4. Check whether the installation is successful
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2If the version definition information appears, the installation succeeds .
Four 、 other
1. Graphics information
# View the graphics card device
lspci |grep -i nvidia
# Check the blind model
nvidia-smi
# View driver information
cat /proc/driver/nvidia/version2. CUDA Information
# 1. see cuda edition
nvcc -V
# 2. see cuda edition
cat /usr/local/cuda/version.txt
3. cuDNN Information
see cudnn.h The header file
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2边栏推荐
猜你喜欢

118. 杨辉三角

Crunch简介、安装,使用Crunch制作密码字典

Intensive cultivation of channels for joint development Fuxin and Weishi Jiajie held a new product training conference

HLS4ML报错The board_part definition was not found for tul.com.tw:pynq-z2:part0:1.0.

精耕渠道共謀發展 福昕攜手偉仕佳傑開展新產品培訓大會

Cookie和Session的相关概念

研究了11种实时聊天软件,我发现都具备这些功能…

servlet知识点

Ubuntu14 install MySQL and configure root account local and remote access

Facebook聊单,SaleSmartly有妙招!
随机推荐
optaplanner学习笔记(一)案例Cloud balance
Compile ffmpeg source code with msys+vs2019 under win10
mysql 报错 Can‘t create table ‘demo01.tb_Student‘ (errno: 150)*
产品模块化设计的前世今生
大厂音视频职位面试题目--今日头条
Live HLS protocol
Time series analysis using kibana timelion
【无标题】
正则表达式=Regex=regular expression
Regular expression =regex=regular expression
面试题 16.16. 部分排序-双指针法
Class loading mechanism
ffmpeg 错误码
H264编码profile & level控制
How to configure webrtc video streaming format for easygbs, a new version of national standard gb28181 video platform?
解决VSCode下载慢或下载失败的问题
Cookie和Session的相关概念
Ffmpeg common commands (2)
ffmpeg 音频相关命令
CMU AI PhD 第一年总结