• ubuntu 20.04


    # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
    
    # 预发布软件源,不建议启用
    # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
    sudo apt update
    sudo apt upgrade

    运行以下命令以获取有关图形卡和可用驱动程序的信息:
    ubuntu-drivers devices
    输出如下:

    sudo apt install nvidia-driver-465
    现在我们安装推荐的驱动程序。
    安装成功后,重新启动系统:
    sudo reboot
    系统重启后,使用以下命令验证驱动程序版本:
    nvidia-smi

     cuda:

    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
    sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
    wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda-repo-ubuntu2004-11-3-local_11.3.0-465.19.01-1_amd64.deb
    sudo dpkg -i cuda-repo-ubuntu2004-11-3-local_11.3.0-465.19.01-1_amd64.deb
    sudo apt-key add /var/cuda-repo-ubuntu2004-11-3-local/7fa2af80.pub
    sudo apt-get update
    sudo apt-get -y install cuda
    $ sudo cp cuda/include/cudnn*.h /usr/local/cuda/include 
    $ sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64 
    $ sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
    alias env='source ~/ENV/bin/activate'
  • 相关阅读:
    Valid Parentheses [LeetCode 20]
    线性回归的Spark实现 [Linear Regression / Machine Learning / Spark]
    逻辑回归的分布式实现 [Logistic Regression / Machine Learning / Spark ]
    Python爬虫之豆瓣-新书速递-图书解析
    安装软件包
    打包与压缩
    linux与linux间,互相拷贝文件
    网络管理
    重定向和管道
    索引
  • 原文地址:https://www.cnblogs.com/medsci/p/14942296.html
Copyright © 2020-2023  润新知