zoukankan      html  css  js  c++  java
  • gpu服务器开发环境搭建

    gpu服务器开发环境搭建

    参考连接

    检查显卡和驱动

    检查驱动列表

    image-20211201155921967

    查看建议版本

    image-20211201155955104

    检查GPU是否支持CUDA

    image-20211201160136402

    查看型号

    image-20211201144954014

    网站输入1db6,可以得到显卡型号

    image-20211201145025029

    安装驱动并测试

    直接安装推荐版驱动

    sudo ubuntu-drivers autoinstall
    

    重启电脑测试驱动是否启动

    有这样的反馈表示正常启动了。

    image-20211201191422174

    安装anoconda

    wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.3.1-Linux-x86_64.sh
    

    依次输入enter、yes、yes、no(不安装vscode),source ~/.bashrc使环境变量生效

    配置pytorch环境

    #创建虚拟环境,并以pytorch_1.2命名,python版本为3.7
    $conda create -n pytorch_1.2 python=3.7
    
    #激活刚刚建立的虚拟环境
    $ conda activate pytorch_1.2
    
    #安装pytorch_1.2相关包,以及cudatoolkit(直接重pytorch官网复制)
    #pytorch官网链接 https://pytorch.org/get-started/previous-versions/
    $ conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
    
    #完成后检查GPU是否可用
    $python
    >>> import torch
    >>> torch.cuda.is_available()
    True
    #True表示成功,Flase表示失败
    

    配置tensorflow环境

    #创建虚拟环境,并以tensorflow_2.0.0命名,python版本为3.7
    $conda create -n tensorflow_2.0.0 python=3.7
    
    #激活刚刚建立的虚拟环境
    $ conda activate tensorflow_2.0.0
    
    #安装tensorflow_2.0.0相关的工具包
    $ conda install tensorflow-gpu==2.0.0 
    
    
    #完成后检查GPU是否可用
    $python
    >>> import tensorflow as tf
    >>> tf.test.is_gpu_available()
    True
    #True表示成功,Flase表示失败
    

    conda配置好不同的工具环境,工具环境和系统环境是独立的

  • 相关阅读:
    swift 中 Self 与self
    Swift 中的泛型
    mac 报文件已损坏 怎么办
    winxp秘钥
    字符串拷贝函数strcpy, strcat, sprintf, strncpy, strncat和snprintf的区别
    【原创】Linux应用程序完整调用自己写的字符设备驱动过程
    idea中新建git分支,并提交到远程github
    (JS-PHP)使用RSA算法进行加密通讯
    Linux日志相关的命令
    hibernate中关于is null的查询
  • 原文地址:https://www.cnblogs.com/gudygudy/p/15635108.html
Copyright © 2011-2022 走看看