Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
bazel使用本地下载的tensorflow构建tensorflow服务_Tensorflow_Bazel_Serving - Fatal编程技术网

bazel使用本地下载的tensorflow构建tensorflow服务

bazel使用本地下载的tensorflow构建tensorflow服务,tensorflow,bazel,serving,Tensorflow,Bazel,Serving,tensorflow服务构建依赖于大型tensorflow;但我已经成功构建了tensorflow。所以我想用它。 我做这些事情: 我更改tensorflow服务工作区(组织:) 我们应该如何成功地为本地tensorflow服务?谢谢大家! 您应该提升docker build ressource CPU和内存。我在笔记本电脑上对docker进行了4 vcpu和4 Gig ram升级,但在构建tensorflow服务映像时,需要使用此选项将Bazzel C编译器的内存限制为2048 Meg d

tensorflow服务构建依赖于大型tensorflow;但我已经成功构建了tensorflow。所以我想用它。 我做这些事情: 我更改tensorflow服务工作区(组织:)


我们应该如何成功地为本地tensorflow服务?谢谢大家!

您应该提升docker build ressource CPU和内存。我在笔记本电脑上对docker进行了4 vcpu和4 Gig ram升级,但在构建tensorflow服务映像时,需要使用此选项将Bazzel C编译器的内存限制为2048 Meg

docker build--pull--build arg TF_service_build_OPTIONS=“--copt=-mavx\
--cxopt=-D_GLIBCXX_USE_CXX11_ABI=0——本地资源2048.5,1.0“-t\
$USER/tensorflow服务于devel-f Dockerfile.devel.
workspace(name = "tf_serving")

# To update TensorFlow to a new revision.
# 1. Update the 'git_commit' args below to include the new git hash.
# 2. Get the sha256 hash of the archive with a command such as...
#    curl -L https://github.com/tensorflow/tensorflow/archive/<git hash>.tar.gz | sha256sum
#    and update the 'sha256' arg with the result.
# 3. Request the new archive to be mirrored on mirror.bazel.build for more
#    reliable downloads.
#load("//tensorflow_serving:repo.bzl", "tensorflow_http_archive")

#tensorflow_http_archive(
#    name = "org_tensorflow",
#    sha256 = "0f4b8375de30c54cc3233bc40e04742dab0ffe007acf8391651c6adb62be89f8",
#    git_commit = "2ea398b12ed18b6c51e09f363021c6aa306c5179",
#)

local_repository(
    name = "org_tensorflow",
    path = "/vagrant/tf/tensorflow/",
)


# TensorFlow depends on "io_bazel_rules_closure" so we need this here.
# Needs to be kept in sync with the same target in TensorFlow's WORKSPACE file.
http_archive(
    name = "io_bazel_rules_closure",
    sha256 = "a38539c5b5c358548e75b44141b4ab637bba7c4dc02b46b1f62a96d6433f56ae",
    strip_prefix = "rules_closure-dbb96841cc0a5fb2664c37822803b06dab20c7d1",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz",
        "https://github.com/bazelbuild/rules_closure/archive/dbb96841cc0a5fb2664c37822803b06dab20c7d1.tar.gz",  # 2018-04-13
    ],
)

# Please add all new TensorFlow Serving dependencies in workspace.bzl.
load("//tensorflow_serving:workspace.bzl", "tf_serving_workspace")

tf_serving_workspace()

# Specify the minimum required bazel version.
load("@org_tensorflow//tensorflow:version_check.bzl", "check_bazel_version_at_least")

check_bazel_version_at_least("0.15.0")
[root@localhost serving]# tools/bazel_in_docker.sh bazel build --config=nativeopt tensorflow_serving/...
== Pulling docker image: tensorflow/serving:nightly-devel
Trying to pull repository docker.io/tensorflow/serving ...
nightly-devel: Pulling from docker.io/tensorflow/serving
Digest: sha256:f500ae4ab367cbabfd474487175bb357d73c01466a80c699db90ba3f0ba7b5a8
Status: Image is up to date for docker.io/tensorflow/serving:nightly-devel
== Running cmd: sh -c 'cd /root/serving; TEST_TMPDIR=.cache bazel build --config=nativeopt tensorflow_serving/...'
usermod: no changes
$TEST_TMPDIR defined: output root default is '/root/serving/.cache' and max_idle_secs default is '15'.
Starting local Bazel server and connecting to it...
.............
ERROR: error loading package '': Encountered error while reading extension file 'tensorflow/workspace.bzl': no such package '@org_tensorflow//tensorflow': /root/serving/.cache/_bazel_root/01a289b7faaf5ec651fb0e4e35f862a1/external/org_tensorflow must be an existing directory
ERROR: error loading package '': Encountered error while reading extension file 'tensorflow/workspace.bzl': no such package '@org_tensorflow//tensorflow': /root/serving/.cache/_bazel_root/01a289b7faaf5ec651fb0e4e35f862a1/external/org_tensorflow must be an existing directory
INFO: Elapsed time: 0.460s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)