1_TensorFlow1.31.1 GPU版本源码编译【重点备忘】

1_TensorFlow1.31.1 GPU版本源码编译【重点备忘】

 

GPU计算能力为3.0的显卡,Kali Linux系统上面配置安装CUDA:

(1)#################### 【  各个软件的版本适配说明 】 ###############
https://tensorflow.google.cn/install/source

(2)#################### 【  Linux上面安装 NVIDIA GPU 显卡驱动 】 #################### 
https://www.kali.org/docs/general-use/install-nvidia-drivers-on-kali-linux/

(3)#################### 【  CUDA 10.0 】 ####################
https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal
★使用  --override 参数进行安装:
.//cuda_10.0.130_410.48_linux.run --override

(4)#################### 【  cuDNN v7.4.2 (Dec 14, 2018), for CUDA 10.0 】 ##########
https://developer.nvidia.com/rdp/cudnn-archive#a-collapse742-10

Compatible Driver >= 410.48

(5)#################### 【    tensorflow-gpu==1.13.1  】 #################### 
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.13.1
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting tensorflow-gpu==1.13.1
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7b/b1/0ad4ae02e17ddd62109cd54c291e311c4b5fd09b4d0678d3d6ce4159b0f0/tensorflow_gpu-1.13.1-cp36-cp36m-manylinux1_x86_64.whl (345.2MB)

(6)####################【   Python 3.3-3.6  下载源码进行编译安装 】##############
https://www.python.org/ftp/python/3.6.8/
    【源码编译参考:】
    https://blog.csdn.net/l497626363/article/details/104903454

(7)####################【   必须将 numpy 降低版本为 1.14 】 ####################
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy==1.14

(8)★★★★★★★★★★★★★★【 安装 GCC4.8   G++4.8 】 ★★★★★★★★★★★★★★★ 
aptitude install gcc-4.8 gcc-4.8-multilib 
aptitude install g++-4.8 g++-4.8-multilib 

(9)★★★★★★★★★★★★★★【 先清理,而后(源码编译安装 tensorflow1.13.1) 】 ★★★★★★★ 
清理:
bazel clean --expunge

root@longhk:/tensorflow-1.13.1# bazel build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package   --verbose_failures

??最开始进行清理:  bazel clean;  【   rm -rf  ~/.cache 不要用,会清除下载的 第三方包!】

root@longhk:/tensorflow-1.13.1# bazel clean --expunge
WARNING: ignoring _JAVA_OPTIONS in environment.
Starting local Bazel server and connecting to it...
INFO: Invocation ID: e2deaab8-0473-499c-a030-829a517b86ee
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
root@longhk:/tensorflow-1.13.1# bazel build 【这个要去掉,否则编译报错: --cxxopt=-std=c++11  】 --copt=-march=native  --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package   --verbose_failures

(10)★★★★★★★★★★★★★★【 下载时,会经常报错的处理。 】★★★★★★★★★★★★★
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: no such package '@llvm//': java.io.IOException: Error downloading [https://mirror.bazel.build/github.com/llvm-mirror/llvm/archive/2ba3294845dedcbb27dc49287bfbcdb49aa1e6b7.tar.gz, https://github.com/llvm-mirror/

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值