我正在使用docker build --pull -t $USER/tensorflow-serving-devel -f Dockerfile.devel .
使用Bazel为TensorFlow构建容器,并按照此处的说明运行docker run -it $USER/tensorflow-serving-devel
:https://www.tensorflow.org/serving/docker
然而,在运行./configure
命令后,我收到此错误
root@4489fe3513fc:/serving/tensorflow# ./configure
Extracting Bazel installation...
You have bazel 0.5.1 installed.
Please upgrade your bazel installation to version 0.5.4 or higher to build TensorFlow!
Configuration finished
root@4489fe3513fc:/serving/tensorflow# cd ..
root@4489fe3513fc:/serving# bazel test tensorflow_serving/...
................
ERROR: /serving/WORKSPACE:23:1: Traceback (most recent call last):
File "/serving/WORKSPACE", line 23
tf_serving_workspace()
File "/serving/tensorflow_serving/workspace.bzl", line 16, in tf_serving_workspace
tf_workspace(path_prefix = "", tf_repo_name = "...")
File "/root/.cache/bazel/_bazel_root/f8d1071c69ea316497c31e40fe01608c/external/org_tensorflow/tensorflow/workspace.bzl", line 146, in tf_workspace
check_version("0.5.4")
File "/root/.cache/bazel/_bazel_root/f8d1071c69ea316497c31e40fe01608c/external/org_tensorflow/tensorflow/workspace.bzl", line 56, in check_version
fail("\nCurrent Bazel version is {}, ...))
Current Bazel version is 0.5.1, expected at least 0.5.4
尝试更新bazel只是给了我相同的版本号0.5.1。我不确定如何处理这个问题。当我尝试更新时,是否有我支持的docker支持标签?
答案 0 :(得分:1)
即使我想要张量为0.8的0.5.4版本的bazel。
试过brew install bazel@0.5.1
。没工作..
所以,我从bazel git发行版下载了bazel 0.5.4版本并按如下方式安装:
bazel version
应为0.5.4 花了几分钟时间以这种方式安装它:)希望有所帮助!!
(我分享了类似的答案here)