当前位置: 首页 > news >正文

Ubuntu22.04安装RTX3080

Ubuntu22.04安装RTX3080

1 安装基础环境

更新依赖包

sudo apt-get update
sudo apt-get upgrade

2 安装驱动

(1)查看适合的显卡驱动

# 查看可用的驱动
sudo ubuntu-drivers devices# 返回值,推荐版本:nvidia-driver-550
ERROR:root:aplay command not found
== /sys/devices/pci0000:ae/0000:ae:00.0/0000:af:00.0 ==
modalias : pci:v000010DEd00002216sv00001458sd0000403Fbc03sc00i00
vendor   : NVIDIA Corporation
model    : GA102 [GeForce RTX 3080 Lite Hash Rate]
driver   : nvidia-driver-535-server - distro non-free
driver   : nvidia-driver-545-open - distro non-free
driver   : nvidia-driver-550 - distro non-free recommended
driver   : nvidia-driver-550-open - distro non-free
driver   : nvidia-driver-535-open - distro non-free
driver   : nvidia-driver-470 - distro non-free
driver   : nvidia-driver-535-server-open - distro non-free
driver   : nvidia-driver-545 - distro non-free
driver   : nvidia-driver-535 - distro non-free
driver   : nvidia-driver-470-server - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

(2)安装驱动

# 安装驱动nvidia-driver550
sudo apt install nvidia-driver-550# 重启
sudo shutdown -r now

(3)查看驱动

# 查看驱动
nvidia-smi# 返回值,注意查看CUDA的版本号
CUDA Version: 12.4

在这里插入图片描述

3 安装CUDA

选择显卡对应版本,驱动对应的大版本即可:12.4

# cuda官网地址
https://developer.nvidia.com/cuda-toolkit-archive

在这里插入图片描述

下载地址

# 下载
wget https://developer.download.nvidia.com/compute/cuda/12.4.1/local_installers/cuda_12.4.1_550.54.15_linux.run# 安装
sudo sh cuda_12.4.1_550.54.15_linux.run

安装步骤

# 选择
continue# 输入
accept# 取消安装Driver,前面框中的X消失
[ ] Driver# 选择
Install# 完成安装后,会返回配置路径,一定要记住,用于下面添加环境变量
===========
= Summary =
===========Driver:   Not Selected
Toolkit:  Installed in /usr/local/cuda-12.4/Please make sure that-   PATH includes /usr/local/cuda-12.4/bin-   LD_LIBRARY_PATH includes /usr/local/cuda-12.4/lib64, or, add /usr/local/cuda-12.4/lib64 to /etc/ld.so.conf and run ldconfig as rootTo uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-12.4/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 550.00 is required for CUDA 12.4 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:sudo <CudaInstaller>.run --silent --driverLogfile is /var/log/cuda-installer.log

Continue
在这里插入图片描述

Install

在这里插入图片描述

安装成功

在这里插入图片描述

添加环境变量

# 编辑环境变量文件
sudo vim /etc/profile# 在最后一行添加环境变量
export PATH=$PATH:/usr/local/cuda-12.4/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12.4/lib64
export CUDA_HOME=/usr/local/cuda-12.4/# 使环境变量生效
source /etc/profile

查看版本

# 查看版本
nvcc -V# 返回值
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0
http://www.lryc.cn/news/463777.html

相关文章:

  • 嵌入式学习-IO进程-Day04
  • RAII - 安卓中的智能指针
  • linux--库指令
  • 展讯方案-内置多张开机logo
  • Stable Diffusion模型资源合集(附整合包)
  • 机器学习|Pytorch实现天气预测
  • 【Kuberntes】k8s权限管理
  • C++,STL 033(24.10.15)
  • AdmX_new
  • 【python3】函数注解
  • leetcode hot100 之【LeetCode 42. 接雨水】 java实现
  • 10月18日,每日信息差
  • Axure科技感元件:打造可视化大屏设计的得力助手
  • 【模板】最近公共祖先(LCA)倍增
  • 我的JAVA项目构建
  • 应用层协议 序列化
  • 【HAD】Half-Truth: A Partially Fake Audio Detection Dataset
  • OpenAI Prompt generation - 生成和优化Prompt的Prompt
  • Android技术探索:深入解析Android组件
  • 使用R-GCN处理异质图ACM的demo
  • 征程 6E DISPLAY 功能介绍及上手实践
  • 安卓窗口wms/input小知识NO_INPUT_CHANNEL剖析
  • 【2024最新版】Win10下 Java环境变量配置----适合入门小白
  • Servlet 生命周期详解及案例演示(SpringMVC底层实现)
  • 2024 kali系统2024版本,可视化界面汉化教程(需要命令行更改),英文版切换为中文版,基于Debian创建的kali虚拟机
  • 深入理解 CMake 中的 INCLUDE_DIRECTORIES 与 target_include_directories
  • 【不知道原因的问题】java.lang.AbstractMethodError
  • 分布式篇(分布式事务)(持续更新迭代)
  • [Linux] 逐层深入理解文件系统 (2)—— 文件重定向
  • html+css+js实现Badge 标记