当前位置:网站首页>[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边栏推荐
- Werewolf killing strategy: do you think I'm easy to cheat? Who do we believe!
- 精耕渠道共谋发展 福昕携手伟仕佳杰开展新产品培训大会
- ddr4测试-2
- MySQl的基本使用
- Wireshark packet analysis TCP, FTP
- A brief understanding of white box encryption technology
- Define dichotomy lookup
- 【AI服务器搭建】CUDA环境
- 利用win7漏洞进行系统登录密码破解
- Salesmartly has some tricks for Facebook chat!
猜你喜欢
随机推荐
Mysql查询结果去除换行
HLS4ML进入方法
Ffmpeg common commands (2)
How to configure webrtc video streaming format for easygbs, a new version of national standard gb28181 video platform?
一文读懂C语言中的结构体
Thesis reading [distinctive late semantic graph for video capturing]
mysql 报错 Can‘t create table ‘demo01.tb_Student‘ (errno: 150)*
CMU AI PhD first year summary
[untitled]
通过js实现金字塔(星号金字塔,回文对称数字金字塔)
Live HLS protocol
Wechat applet navigator has a shadow after clicking. Remove the shadow effect of navigator
SQL 入门计划-1-选择
ES6中的代理proxy
Solution and summary of Nacos startup failure
Why has instagram changed from a content sharing platform to a marketing tool? How do independent sellers use this tool?
axure不显示元件库
Intensive cultivation of channels for joint development Fuxin and Weishi Jiajie held a new product training conference
uni-app商品分类
Test self-study people must see: how to find test items in software testing?









