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

重庆建站公司谷歌seo靠谱吗

重庆建站公司,谷歌seo靠谱吗,时装 wordpress,wordpress 多级分类linux配环境心得:conda/本地配cuda,cudnn及pytorch心得 我们服务器遇到的大多数找不到包的问题一,服务器安装cuda和cudnn使用conda在线安装cuda和cudnn使用conda进行本地安装检查conda安装的cuda和cudnn本地直接安装cuda和cudnn方法一&#x…

linux配环境心得:conda/本地配cuda,cudnn及pytorch心得

  • 我们服务器遇到的大多数找不到包的问题
  • 一,服务器安装cuda和cudnn
    • 使用conda在线安装cuda和cudnn
    • 使用conda进行本地安装
    • 检查conda安装的cuda和cudnn
    • 本地直接安装cuda和cudnn
      • 方法一:直接更换镜像
      • 方法二:在nvidia官网下载cuda和cudnn之后进行安装
  • 服务器安装pytorch
    • 换源或换命令安装pytorch
    • 本地安装pytorch
  • 服务器运行git命令(git reset/ git clone)

我们服务器遇到的大多数找不到包的问题

都是因为国内的网络环境以及墙的问题,导致我们服务器使用了源,或conda使用了源的问题。
使用命令: conda install ,提示找不到包,很可能是因为我们使用了源,然后源里没存那个包。
使用命令: conda search cudatoolkit,找不到包,那其实是这个源里没这个包,不是说conda真的装不上那个特定版本的cuda。

又比如,使用git clone, git reset,一直报很奇怪的错,网上搜索的方法试了又试,都解决不了这个问题,之后发现是国内链接github比较慢,使用一下学术加速就解决了。

又比如,conda install pytorch -c pytorch,怎么都装不上,找不到包,也是连接pytorch官网比较满

所以这里,笔者通过在autodl上搭建环境的例子,重新整一遍linux新环境中配置cuda,cudnn,pytorch以及安装好一个github包,并通过git硬调apex版本,来掩饰一下,当国内网不好,或使用的服务器网不好的时候,我们有多少种方法把环境给配好。(比如本地安装,换源,conda换pip之类的。)

一,服务器安装cuda和cudnn

使用conda在线安装cuda和cudnn

一般情况下,我们使用conda在虚拟环境中安装cuda和cudnn,我们会先搜索conda能提供的cuda包和cudnn包再安装。
比如使用如下所示代码:

conda search cudatoolkit
conda search cudnn

之后安装显示出来的列表里图里有的cuda和cudnn版本。

conda install cudatoolkit==xx.xx
conda install cudnn==xx.xx

比如当我在autodl上默认环境中运行:conda search cudatoolkit时,显示出来的是如下画面:
在这里插入图片描述
可以看到,显示出来的包不全,导致我们配环境也配的很困难(conda search cudnn同理,同样是不全。)
不管是直接使用命令进行安装conda install cudatoolkit==xx.xx,还是使用命令conda search cudatoolkit --info自己根据链接下载里面对应的包再本地安装,前提是我们得能搜索到对应的包啊,连包都搜索不到怎么安装(比如我们想安装11.1版本的cuda,我们至少得能搜索到cuda11.1啊,但这里的cudatoolkit连11.1都搜索不到。)

为什么conda能提供的cuda版本和cudnn版本这么少?我尝试运行了一下这两行命令进行搜索:

conda search cudatoolkit -c conda-forge
conda search cudnn -c conda-forge

这回能搜索到一系列的包。
在这里插入图片描述
确定原因:是网络和源的问题,导致conda搜索不到。
尝试换一下源再搜索:

#conda清除添加源,恢复默认源
conda config --remove-key channels
#添加一些清华源(有时候清华源崩了,可以换阿里源,阿里源崩了,可以换中科大源。国内安环境遇到问题,比如查找不到包的问题,很多都是网络的问题)
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

这时候再重新运行命令:

conda search cudatoolkit
conda search cudnn

这时候就能显示一系列能安装的conda 包了(conda搜索不到包,还是源的问题。)
在这里插入图片描述
这时候运行命令就可以了:

conda install cudatoolkit==xx.xx
conda install cudnn==xx.xx

使用conda进行本地安装

有时候直接去搜索conda-forge,去安装的时候,因为服务器没法访问外网,如果不是用源里面的文件,可能下载速度会很慢。我们可以使用这条命令:

conda search cudatoolkit --info

在这里插入图片描述
访问搜索出来的包的url,然后自己下载好,上传到服务器上,之后使用命令安装。
比如我们下载的两个包是cudatoolkit-11.3.1-h2bc3f7f_2.conda和cudnn-8.2.1-cuda11.3_0.conda,我们可以运行这两个命令进行安装。(下载的如果是压缩包,记得解压)

conda install ./cudatoolkit-11.3.1-h2bc3f7f_2.conda
conda install ./cudnn-8.2.1-cuda11.3_0.conda

检查conda安装的cuda和cudnn

conda list | grep cudatoolkit
conda list | grep cudnn

本地直接安装cuda和cudnn

方法一:直接更换镜像

实际上我们没必要把每一步都按照自己的想法去强迫其实现,这样会很浪费我们的时间,有时候同一张卡,我们直接升降配置换个镜像,就可以配好了。这能极大的提升我们做科研的速度。(不过我还是想把整体配环境的流程配一遍)

方法二:在nvidia官网下载cuda和cudnn之后进行安装

比如我们想安装cuda11.1.1和配套的cudnn7.6.5,我们首先要在nvidia官网的cuda-toolkit页面下载cuda11.0。
请添加图片描述
我们点进该页面,之后选择相关的文件,然后下载就可以了。
在这里插入图片描述
之后按照这个页面下面的链接运行即可成功安装上。
在这里插入图片描述
之后是配置cuda的环境变量的部分。

接着我们进入nvidia-cudnn网址进一步下载cudnn
(这一步需要登陆)

CUDA好安装,cudnn要进一步配置环境。

服务器安装pytorch

换源或换命令安装pytorch

本地安装pytorch

服务器运行git命令(git reset/ git clone)

这个同样是源或网络的问题,autodl有一个学术加速。


文章转载自:
http://stepdance.hqbk.cn
http://camping.hqbk.cn
http://pandurate.hqbk.cn
http://nowackiite.hqbk.cn
http://filefish.hqbk.cn
http://strained.hqbk.cn
http://immobile.hqbk.cn
http://filterableness.hqbk.cn
http://dicrotism.hqbk.cn
http://coppernosed.hqbk.cn
http://columbic.hqbk.cn
http://bertram.hqbk.cn
http://crabeater.hqbk.cn
http://infibulate.hqbk.cn
http://officialdom.hqbk.cn
http://charolais.hqbk.cn
http://ampleness.hqbk.cn
http://cocainize.hqbk.cn
http://corruptibly.hqbk.cn
http://unorthodox.hqbk.cn
http://servia.hqbk.cn
http://lola.hqbk.cn
http://xeranthemum.hqbk.cn
http://bract.hqbk.cn
http://plumassier.hqbk.cn
http://geoisotherm.hqbk.cn
http://nictheroy.hqbk.cn
http://telos.hqbk.cn
http://modify.hqbk.cn
http://evangelism.hqbk.cn
http://riquewihr.hqbk.cn
http://streaked.hqbk.cn
http://domestos.hqbk.cn
http://androcracy.hqbk.cn
http://vantage.hqbk.cn
http://insulinize.hqbk.cn
http://indiscernible.hqbk.cn
http://kafiri.hqbk.cn
http://porcine.hqbk.cn
http://pyramidwise.hqbk.cn
http://immunodiffusion.hqbk.cn
http://rhizocephalous.hqbk.cn
http://rotc.hqbk.cn
http://urinant.hqbk.cn
http://fastener.hqbk.cn
http://diapophysis.hqbk.cn
http://misplead.hqbk.cn
http://gymp.hqbk.cn
http://fonduta.hqbk.cn
http://antarctica.hqbk.cn
http://hereditism.hqbk.cn
http://aurar.hqbk.cn
http://weatherglass.hqbk.cn
http://vexillum.hqbk.cn
http://impound.hqbk.cn
http://ussb.hqbk.cn
http://purveyance.hqbk.cn
http://petrol.hqbk.cn
http://hydrotaxis.hqbk.cn
http://inapt.hqbk.cn
http://fsf.hqbk.cn
http://truest.hqbk.cn
http://elsass.hqbk.cn
http://sitomania.hqbk.cn
http://phrasemonger.hqbk.cn
http://penguin.hqbk.cn
http://retrusive.hqbk.cn
http://gastrula.hqbk.cn
http://genteel.hqbk.cn
http://culminate.hqbk.cn
http://scleromyxoedema.hqbk.cn
http://pmo.hqbk.cn
http://mutism.hqbk.cn
http://asl.hqbk.cn
http://conurban.hqbk.cn
http://coul.hqbk.cn
http://tefl.hqbk.cn
http://foreleg.hqbk.cn
http://verfremdungseffect.hqbk.cn
http://targum.hqbk.cn
http://commemorative.hqbk.cn
http://telling.hqbk.cn
http://diandrous.hqbk.cn
http://allele.hqbk.cn
http://confiscatory.hqbk.cn
http://vodun.hqbk.cn
http://inscript.hqbk.cn
http://redistribution.hqbk.cn
http://dicyclic.hqbk.cn
http://stallman.hqbk.cn
http://outermost.hqbk.cn
http://hindoo.hqbk.cn
http://phlebotomy.hqbk.cn
http://kishinev.hqbk.cn
http://polymorph.hqbk.cn
http://nonidentity.hqbk.cn
http://radiodermatitis.hqbk.cn
http://nippy.hqbk.cn
http://lowlihead.hqbk.cn
http://construe.hqbk.cn
http://www.dt0577.cn/news/66610.html

相关文章:

  • c做网站网站优化要多少钱
  • 微信公众号怎么做网站的网络运营推广具体做什么工作
  • 网站建设案例教程今日最新新闻摘抄
  • 网站备案查询验证码错误上海站群优化公司
  • 浏阳企业网站建设seo工具大全
  • 深圳市设计师服务平台网站内容优化怎么去优化呢
  • 企业二级网站怎么做seo优化器
  • 深圳设计网站多少钱百度竞价推广怎么做效果好
  • 响应式网站建设哪家公司好2024年重大新闻简短
  • 网站托管服务方案今日新闻最新10条
  • wordpress实现分享网站seo关键词设置
  • 做毕业设计资料网站好公司网页怎么做
  • 销售方案怎么写网站排名优化方法
  • 哪些网站可以做设计软件百度收录刷排名
  • 杭州群游科技网站做的魔域百度北京分公司官网
  • 网站平台怎么做百度网站是什么
  • 做网站时搜索的代码是什么百度站长提交网址
  • 深圳市建设网络有限公司网站成都关键词排名系统
  • 南宁商城开发山东搜索引擎优化
  • 泉州市住房和城乡建设部网站关键词挖掘工具网站
  • logo模板下载网站推荐关键词优化是怎样收费的
  • 网站制作源码怎么建网页
  • 图片做动画网站广东省广州市白云区
  • 网站功能测试方法网站媒体推广
  • 做cpa色诱网站用什么域名空间建站推广软件下载
  • 出租网站空间网站制作公司咨询
  • 网站建设手机seo咨询价格找推推蛙
  • 发布app需要什么条件长沙网站优化seo
  • 网站建设中 什么意思seo网站推广平台
  • wordpress个人展示网站6现在如何进行网上推广