云服务器上配置GPU环境(cuda, cudnn)的几个步骤及踩坑

本文详细介绍了在云服务器上配置GPU环境的步骤,包括安装Python、NVIDIA驱动、CUDA Toolkit 10.0、cuDNN以及tensorflow-gpu。特别提醒在安装CUDA时不要更新NVIDIA驱动,安装cuDNN后需配置环境变量,以确保神经网络加速库的正确使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

云服务器上配置GPU环境(cuda, cudnn)的几个步骤

步骤一: 安装python

  1. 这里推荐使用清华镜像安装对应版本anaconda

  2. 浏览器打开 清华镜像

  3. 找到适合自己的版本,在那一行鼠标右键,复制链接地址

  4. 我这里是 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.2.0-Linux-x86_64.sh

  5. 使用 wget url 进行下载指定版本

    # 使用清华镜像安装对应版本
    wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.2.0-Linux-x86_64.sh
    
  6. 注意 这里要检查一下是否安装过bunzip2,命令是bzip2。没有的需要先安装一下bzip2
    使用 whereis 检查是否安装过某个软件

    # 检查是否安装过bzip2
    whereis bzip2
    # 安装过的会返回(路径可能不一样) bzip2: /usr/bin/bzip2 /root/anaconda3/bin/bzip2 /usr/share/man/man1/bzip2.1.gz
    
    # 未安装过的用yum直接安装
    yum install bzip2
    
  7. 下载完成后 使用 sudo bash …进行安装

    sudo bash Anaconda3-5.2.0-Linux-x86_64.sh
    y
    y
    n
    

    一直回车, 直到看见 Do you accept the license terms? [yes|no], 问你是否同意他们的服务条款, 输入yes or no自己选择吧~
    你做出适当选择后,会出来

    Anaconda3 will now be installed into this location:
    /root/anaconda3
    
    - Press ENTER to confirm the location
    - Press CTRL-C to abort the installation
    - Or specify a different location below
    
    [/root/anaconda3] >>>
    

    询问你安装路径, 默认安装在/root/anaconda3。如果安装到其他路径的话, 直接键盘输入你的绝对路径回车, 否则直接回车即可。
    等待几分钟

    ...
    ...
    installing: anaconda-5.2.0-py36_3 ...
    installation finished.
    Do you wish the installer to prepend the Anaconda3 install location
    to PATH in your /root/.bashrc ? [yes|no]
    </
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值