当前位置:网站首页>[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 devices
2. Install recommended drive
sudo apt install nvidia-driver-470-server
3. 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_PATH
4. 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
./deviceQuery
3. 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.tgz
3. 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.h
4. Check whether the installation is successful
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
If 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/version
2. 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
边栏推荐
- Remove line breaks from MySQL query results
- [go ~ 0 to 1] day 5 July 1 type alias, custom type, interface, package and initialization function
- Interview question 16.16 Partial sorting - Double finger needling
- tensorflow报错Could not load dynamic library ‘libcudnn.so.8
- Linux下安装Redis,并配置环境
- Uni app product classification
- 2022/5/23-2022/5/30
- ES6中的代理proxy
- Proxy in ES6
- ffmpeg常用命令(二)
猜你喜欢
optaplanner学习笔记(一)案例Cloud balance
Optimization of video streaming with repeated requests in the case of unstable easygbs network
Why must we move from Devops to bizdevops?
Flutter 实战-快速实现音视频通话应用
How to correctly use vertx to operate redis (3.9.4 with source code analysis)
The use of subplot function in MATLAB
Introduction to relevant processes and functions of wechat official account development
Introduction and installation of crunch, and making password dictionary with crunch
JS的Proxy
JVM memory model
随机推荐
New window open page -window open
【无标题】
IPv4地址、子网掩码、网关
Introduction and installation of crunch, and making password dictionary with crunch
1592 例题1 国王(Sgu223 LOJ10170 LUOGU1896 提高+/省选-) 暴力思考 状压DP 01背包
解决VSCode下载慢或下载失败的问题
Shell advanced
js三元表达式复杂条件判断
音频编解码基础知识
【AI服务器搭建】CUDA环境
EasyGBS网络不稳定情况下重复请求视频拉流问题的优化
ffmpeg 错误码
Intensive cultivation of channels for joint development Fuxin and Weishi Jiajie held a new product training conference
数字化转型企业成功的关键,用数据创造价值
HLS4ML进入方法
为什么一定要从DevOps走向BizDevOps?
[go ~ 0 to 1] day 5 July 1 type alias, custom type, interface, package and initialization function
118. Yanghui triangle
GetMessage底层机制分析
Live HLS protocol