Home » Nano入门教程软件篇 » Nano入门教程软件篇-安装TensorFlow-GPU

Nano入门教程软件篇-安装TensorFlow-GPU

Nano入门教程软件篇-安装TensorFlow-GPU

说明:

  • 介绍如何在Nano上安装最新版本的TensorFlow

步骤:

  • 安装依赖
$ sudo apt-get install libhdf5-serial-dev hdf5-tools
$ sudo apt-get install python3-pip
$ pip3 install -U pip
$ sudo apt-get install zlib1g-dev zip libjpeg8-dev libhdf5-dev 
$ sudo python3 -m pip install -U numpy grpcio absl-py py-cpuinfo psutil portpicker grpcio six mock requests gast h5py astor termcolor
  • 安装TensorFlow
$ pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu
  • 指定版本
$ pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==$TF_VERSION+nv$NV_VERSION
  • 例如:
$ pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.12.0+nv19.1
  • 验证:
$ python3
>>> import tensorflow
  • 如果安装正确,则不会报错
  • 卸载
$ pip3 uninstall -y tensorflow-gpu

参考:

  • https://www.tensorflow.org/tutorials
  • https://www.tensorflow.org/api_docs/python
  • https://docs.nvidia.com/deeplearning/dgx/index.html
  • https://docs.nvidia.com/deeplearning/dgx/install-tf-xavier/index.html

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: nano入门教程软件篇