linux上tensorflow2-gpu的环境配置及安装过程

安装tf2的cpu运行版本使用pip安装几个包即可,但是tf2-gpu需要一定的cuda等环境,所以这里使用anaconda来安装tf2-gpu的虚拟环境,简化安装过程。

安装anaconda

下载Anaconda3-5.0.1-Linux-x86_64.sh,下载地址为: https://repo.continuum.io/archive/index.html,需要将anaconda加入到环境变量中。

启动环境

  • source ~/.bashrc安装后重启环境变量
  • 输入anaconda -V之后会输出anaconda Command line client

创建环境

  • conda create -n tf2 python=3.6 创建一个环境,用来安装tensorflow2.0以及相关的python packages.
  • tf2的配置目录是在anaconda3-envs,运行source activate tf2激活环境
  • conda install cudatoolkit=10 cudnn=7.3
  • conda install tensorflow-gpu
  • pip install tf-nightly-gpu
  • pip install tf-nightly-gpu-2.0-preview
  • pip install --upgrade tensorflow-gpu==2.0.0-beta1

安装jupyter

  • pip install jupyter notebook
  • nohup jupyter notebook & 运行jupyter服务
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值