美文网首页
ubuntu安装cuda和cudnn

ubuntu安装cuda和cudnn

作者: woodcol | 来源:发表于2024-03-10 20:37 被阅读0次

    ubuntu使用apt安装nvidia驱动(参考:https://www.myfreax.com/how-to-nvidia-drivers-on-ubuntu-20-04/)
    使用下边命令查看系统可以安装的驱动:

    sudo add-apt-repository ppa:micahflee/ppa
    sudo apt update
    
    ubuntu-drivers devices
    

    使用下边命令安装需要的驱动:

    sudo apt install nvidia-driver-455
    

    重启系统,查看是否安装成功

    sudo reboot
    nvidia-smi
    

    关闭ubuntu桌面

    systemctl isolate multi-user.target
    

    安装驱动或者cuda

    sudo sh cuda_11.8.0_520.61.05_linux.run
    

    开启桌面

    sudo systemctl start graphical.target
    

    激活python环境

    conda activate comfyui
    

    安装torch(从这里获取安装命令:https://pytorch.org/get-started/locally/)

    pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
    

    其他工具:
    cuda下载:
    https://developer.nvidia.com/cuda-toolkit-archive

    cudnn下载:
    https://developer.nvidia.com/rdp/cudnn-archive

    为ubuntu系统终端使用代理

    export https_proxy=http://192.168.88.253:10811 http_proxy=http://192.168.88.253:10811 all_proxy=socks5://192.168.88.253:10810
    

    相关文章

      网友评论

          本文标题:ubuntu安装cuda和cudnn

          本文链接:https://www.haomeiwen.com/subject/hnbpzdtx.html