当前位置:网站首页>[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
边栏推荐
- GC垃圾回收
- Redo和Undo的区别
- GB28181之SIP协议
- Axure does not display catalogs
- Collect Tiktok video
- 博途V16 获取系统时间转换成字符串
- 新增订单如何防止重复提交
- 1592 例题1 国王(Sgu223 LOJ10170 LUOGU1896 提高+/省选-) 暴力思考 状压DP 01背包
- Why has instagram changed from a content sharing platform to a marketing tool? How do independent sellers use this tool?
- GetMessage底层机制分析
猜你喜欢
随机推荐
简版拼多多商品数据
MySQl的基本使用
Flutter 实战-快速实现音视频通话应用
【无标题】
使用 Kibana Timelion 进行时间序列分析
Define dichotomy lookup
703. The k-th element in the data flow
servlet知识点
Task: denial of service DOS
uni-app微信小程序一键登录获取权限功能
宝,运维100+服务器很头疼怎么办?用行云管家!
GC垃圾回收
[go ~ 0 to 1] day 4 June 30 defer, structure, method
Instagram 为何从内容共享平台变成营销工具?独立站卖家如何利用该工具?
解决VSCode下载慢或下载失败的问题
Case sharing: basic networking configuration of QinQ
Ffmpeg common commands (2)
Regular expression =regex=regular expression
【AI服务器搭建】CUDA环境
ddr4测试-2