Ubuntu16.04LTS安装Tensorflow


还原系统python3
将python3.7 指向新python
安装pip 19.0

安装NVDIA驱动程序

离线安装cuda的话,这个驱动程序被集成在里面。可以不用独立安装。

安装CUDA 10.1

sudo dpkg -i cuda-repo-ubuntu1604-10-1-local-10.1.105-418.39_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda

安装CUPTI?

export LD_LIBRARPAPAY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64
export CUDA_HOME = /usr/local/cuda
export PATH = $PATH:$CUDA_HOME/bin

安装cuDnn 7.6.5

sudo dpkg -i libcudnn*.deb(已弃用)
sudo apt install ./libcudnn7_7.6.4.38-1+cuda10.1_amd64.deb

升级GCC

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100

从源码构建tensorflow

配置开发环境

sudo apt install python3.7-dev python3.7-pip

pip3 install -U --user pip six 'numpy<1.19.0' wheel setuptools mock 'future>=0.17.1' 'gast==0.3.3' typing_extensions
pip3 install -U --user keras_applications --no-deps
pip3 install -U --user keras_preprocessing --no-deps
cd tensorflow
./configure 

install bazel
~~>https://www.cnblogs.com/aidenzdly/p/10996566.html

ice-cream@ice-cream-XPS-15-9550:~/Desktop$ ./bazel-3.6.0-installer-linux-x86_64.sh --user
Bazel installer
---------------

Bazel is bundled with software licensed under the GPLv2 with Classpath exception.
You can find the sources next to the installer on our release page:
   https://github.com/bazelbuild/bazel/releases

# 

## Build information
   - [Commit](https://github.com/bazelbuild/bazel/commit/4be7dd2)
Uncompressing......Extracting Bazel installation...
.

Bazel is now installed!

Make sure you have "/home/ice-cream/bin" in your path. You can also activate bash
completion by adding the following line to your ~/.bashrc:
  source /home/ice-cream/.bazel/bin/bazel-complete.bash

See http://bazel.build/docs/getting-started.html to start a new project!

install go

reference : https://blog.csdn.net/Booboochen/article/details/82463162

wget https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz
tar -zxvf go1.13.1.linux-amd64.tar.gz
mv go /usr/local  #install to /usr/local
gedit ~/.bash
export GOPATH=$HOME/go
export GOROOT=/usr/local/go
export GOTOOLS=$GOROOT/pkg/tool
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置.
/etc/bashrc: 为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.
~/.bash_profile: 每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件.
~/.bashrc: 该文件包含专用于你的bash shell的bash信息,当登录时以及每次打开新的shell时,该该文件被读取.
~/.bash_logout: 当每次退出系统(退出bash shell)时,执行该文件.

另外,/etc/profile中设定的变量(全局)的可以作用于任何用户,而~/.bashrc等中设定的变量(局部)只能继承/etc/profile中的变量,他们是"父子"关系.

保存终端

sudo script screen.log
exit

using Git

https://blog.csdn.net/tina_ttl/article/details/51326684

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值