1)首先安装Docker
yum -y install docker-io
2)更改配置文件
vi /etc/sysconfig/docker
other-args列更改为:other_args="--exec-driver=lxc --selinux-enabled"
3)启动docker服务
service docker start
4)搜索tensorflow镜像
docker search tensorflow
5)选择非GPU版本安装
docker pull daocloud.io/daocloud/tensorflow:0.9.0
6)启动Docker上tensorflow镜像
运行python
>>import tensorflow as tf
如果没有错误,则安装成功。
yum -y install docker-io
2)更改配置文件
vi /etc/sysconfig/docker
other-args列更改为:other_args="--exec-driver=lxc --selinux-enabled"
3)启动docker服务
service docker start
4)搜索tensorflow镜像
docker search tensorflow
5)选择非GPU版本安装
docker pull daocloud.io/daocloud/tensorflow:0.9.0
6)启动Docker上tensorflow镜像
docker run -it daocloud.io/daocloud/tensorflow:0.9.0 bash
下面这样 启动 可以直接完成Docker挂载盘
docker run -it -v /root/tensorflow:/root/tensorflow daocloud.io/daocloud/tensorflow:0.9.0 bash
运行python
>>import tensorflow as tf
如果没有错误,则安装成功。
本文详细介绍如何在Docker环境中安装并配置TensorFlow,包括安装Docker、更改配置文件、启动服务、搜索及安装TensorFlow镜像等步骤,并提供测试TensorFlow是否安装成功的指导。

322

被折叠的 条评论
为什么被折叠?



