Tensorflow服务Git存储库陈旧? Tensorflow文件夹不存在

时间:2018-02-04 13:26:23

标签: linux git docker tensorflow tensorflow-serving

我正在尝试按照说明创建Tensorflow服务器。 docker build命令工作,后面的docker run命令也可以。但是,当我尝试cd到服务/ tensorflow时,它告诉我文件不存在。确实' ls'命令显示服务目录包含tensorflow_server目录但没有tensorflow目录。

看来,新的Git版本于2018年1月29日完成,功能上从存储库中删除了tensorflow和tf_models子模块。但是,没有Tensorflow服务文档和教程的串联更新,现在看起来都是陈旧的。我遇到的问题将在下面进一步描述。我的问题是如何解决这个问题,以便我可以在官方教程中运行inception-V3消息传递示例?

环境信息:

lsb_release -a >>
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial

一些可重现的代码:

克隆回购没有明显问题:

:~$ git clone --recursive https://github.com/tensorflow/serving
Cloning into 'serving'...
Checking connectivity... done.

执行docker build命令,没有明显问题:

~/serving$ docker build --pull -t $USER/tensorflow-serving-devel -f     tensorflow_serving/tools/docker/Dockerfile.devel .
Sending build context to Docker daemon  6.178MB
Step 1/9 : FROM ubuntu:16.04 ...
Step 6/9 : ENV BAZEL_VERSION 0.5.4 ...
Successfully built 
Successfully tagged ../tensorflow-serving-devel:latest

执行docker run命令,没有明显问题:

~/serving$ docker run --name=tensorflow_container -it $USER/tensorflow-    serving-devel
root@26f2fg3e417:/#

从Docker容器中克隆的repo没有明显的问题:

root@26f2fg3e417:/# git clone --recursive https://github.com/tensorflow      /serving
Cloning into 'serving'...
remote: Counting objects: 6130, done.
remote: Compressing objects: 100% (91/91), done.
remote: Total 6130 (delta 85), reused 103 (delta 59), pack-reused 5977
Receiving objects: 100% (6130/6130), 2.38 MiB | 0 bytes/s, done.
Resolving deltas: 100% (4358/4358), done.
Checking connectivity... done.

尝试cd进服务/ tensorflow是有问题的!:

:/# cd serving/tensorflow
bash: root@26f2fg3e417:/#: No such file or directory

-ls输出:

root@...:/# ls
bazel  boot  etc   lib    media  opt   root  sbin     srv  tmp  var
bin    dev   home  lib64  mnt    proc  run   serving  sys  usr

cd服务,然后是ls:

/serving# ls
AUTHORS          LICENSE    RELEASE.md  tensorflow_serving
CONTRIBUTING.md  README.md  WORKSPACE   tools

2 个答案:

答案 0 :(得分:1)

感谢您的回复。上述建议对我不起作用。

幸运的是,来自GitHub的zf109的以下答案有效:

  

您可以尝试手动克隆它:

     

cd / serving&& git clone --recursive https://github.com/tensorflow/tensorflow.git

     

不确定这是否有帮助,但它解决了我的问题:)

请参阅:https://github.com/tensorflow/serving/issues/755

答案 1 :(得分:0)

你的命令是:

 git clone --recursive https://github.com/tensorflow      /serving

这意味着张量流回购内容直接在/服务

如果您希望cd serving/tensorflow成功,则需要输入:

git clone --recursive https://github.com/tensorflow      /serving/tensorflow

(确保先删除/serving中克隆的内容)