Linux下,利用anaconda安装tensorflow GPU版本

在安装tensorflow的时候,试了很多种方法,最后是一条命令搞定。
先说下出现的问题吧:

  1. 首先安装的TensorFlow CPU版本
    出现了以下问题,主要是由于CPU是早期的造成的,只能安装早期tensorflow版本。
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
  1. 安装GPU版本
    考虑到服务器上块P100显卡,不用实在是暴殄天物,还是直接安装GPU版本的吧。
    于是乎出现了以下问题:主要问题是tensorflow-GPU的版本与CUDA以及CUDNN 版本不一致。
2019-10-15 19:19:41.440285: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2019-10-15 19:19:41.465433: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-10-15 19:19:41.465758: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: 

可用以下命令查找CUDA以及CUDNN 版本

cat /usr/local/cuda/version.txt 
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
  1. 后来用anaconda,进入当前的python环境,直接用conda安装,一步成功了…
conda install tensorflow-gpu
发布了6 篇原创文章 · 获赞 26 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/qq_33683032/article/details/104683575
今日推荐