From c40e0fb6d59bc755f5289de6efa109bb13351440 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Fri, 31 Mar 2023 10:29:34 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 520956127 --- .bazelversion | 2 +- Dockerfile | 2 +- WORKSPACE | 140 ++++++++++++++++---------------- docs/getting_started/install.md | 2 +- 4 files changed, 73 insertions(+), 73 deletions(-) diff --git a/.bazelversion b/.bazelversion index 91ff57278..f3b5af39e 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -5.2.0 +6.1.1 diff --git a/Dockerfile b/Dockerfile index 3df22cc04..03b335823 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ RUN pip3 install tf_slim RUN ln -s /usr/bin/python3 /usr/bin/python # Install bazel -ARG BAZEL_VERSION=5.2.0 +ARG BAZEL_VERSION=6.1.1 RUN mkdir /bazel && \ wget --no-check-certificate -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/b\ azel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \ diff --git a/WORKSPACE b/WORKSPACE index 17e96c0b2..199b6a000 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -54,6 +54,76 @@ load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependen rules_foreign_cc_dependencies() +http_archive( + name = "com_google_protobuf", + sha256 = "87407cd28e7a9c95d9f61a098a53cf031109d451a7763e7dd1253abf8b4df422", + strip_prefix = "protobuf-3.19.1", + urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz"], + patches = [ + "@//third_party:com_google_protobuf_fixes.diff" + ], + patch_args = [ + "-p1", + ], +) + +# Load Zlib before initializing TensorFlow and the iOS build rules to guarantee +# that the target @zlib//:mini_zlib is available +http_archive( + name = "zlib", + build_file = "@//third_party:zlib.BUILD", + sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", + strip_prefix = "zlib-1.2.11", + urls = [ + "http://mirror.bazel.build/zlib.net/fossils/zlib-1.2.11.tar.gz", + "http://zlib.net/fossils/zlib-1.2.11.tar.gz", # 2017-01-15 + ], + patches = [ + "@//third_party:zlib.diff", + ], + patch_args = [ + "-p1", + ], +) + +# iOS basic build deps. +http_archive( + name = "build_bazel_rules_apple", + sha256 = "3e2c7ae0ddd181c4053b6491dad1d01ae29011bc322ca87eea45957c76d3a0c3", + url = "https://github.com/bazelbuild/rules_apple/releases/download/2.1.0/rules_apple.2.1.0.tar.gz", + patches = [ + # Bypass checking ios unit test runner when building MP ios applications. + "@//third_party:build_bazel_rules_apple_bypass_test_runner_check.diff" + ], + patch_args = [ + "-p1", + ], +) + +load( + "@build_bazel_rules_apple//apple:repositories.bzl", + "apple_rules_dependencies", +) +apple_rules_dependencies() + +load( + "@build_bazel_rules_swift//swift:repositories.bzl", + "swift_rules_dependencies", +) +swift_rules_dependencies() + +load( + "@build_bazel_rules_swift//swift:extras.bzl", + "swift_rules_extra_dependencies", +) +swift_rules_extra_dependencies() + +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", +) +apple_support_dependencies() + # This is used to select all contents of the archives for CMake-based packages to give CMake access to them. all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])""" @@ -133,19 +203,6 @@ http_archive( urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz"], ) -http_archive( - name = "com_google_protobuf", - sha256 = "87407cd28e7a9c95d9f61a098a53cf031109d451a7763e7dd1253abf8b4df422", - strip_prefix = "protobuf-3.19.1", - urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz"], - patches = [ - "@//third_party:com_google_protobuf_fixes.diff" - ], - patch_args = [ - "-p1", - ], -) - load("@//third_party/flatbuffers:workspace.bzl", flatbuffers = "repo") flatbuffers() @@ -319,63 +376,6 @@ http_archive( ], ) -# Load Zlib before initializing TensorFlow and the iOS build rules to guarantee -# that the target @zlib//:mini_zlib is available -http_archive( - name = "zlib", - build_file = "@//third_party:zlib.BUILD", - sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", - strip_prefix = "zlib-1.2.11", - urls = [ - "http://mirror.bazel.build/zlib.net/fossils/zlib-1.2.11.tar.gz", - "http://zlib.net/fossils/zlib-1.2.11.tar.gz", # 2017-01-15 - ], - patches = [ - "@//third_party:zlib.diff", - ], - patch_args = [ - "-p1", - ], -) - -# iOS basic build deps. -http_archive( - name = "build_bazel_rules_apple", - sha256 = "f94e6dddf74739ef5cb30f000e13a2a613f6ebfa5e63588305a71fce8a8a9911", - url = "https://github.com/bazelbuild/rules_apple/releases/download/1.1.3/rules_apple.1.1.3.tar.gz", - patches = [ - # Bypass checking ios unit test runner when building MP ios applications. - "@//third_party:build_bazel_rules_apple_bypass_test_runner_check.diff" - ], - patch_args = [ - "-p1", - ], -) - -load( - "@build_bazel_rules_apple//apple:repositories.bzl", - "apple_rules_dependencies", -) -apple_rules_dependencies() - -load( - "@build_bazel_rules_swift//swift:repositories.bzl", - "swift_rules_dependencies", -) -swift_rules_dependencies() - -load( - "@build_bazel_rules_swift//swift:extras.bzl", - "swift_rules_extra_dependencies", -) -swift_rules_extra_dependencies() - -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) -apple_support_dependencies() - # More iOS deps. http_archive( diff --git a/docs/getting_started/install.md b/docs/getting_started/install.md index cc5c0241d..05f291e5c 100644 --- a/docs/getting_started/install.md +++ b/docs/getting_started/install.md @@ -577,7 +577,7 @@ next section. Option 1. Follow [the official Bazel documentation](https://docs.bazel.build/versions/master/install-windows.html) - to install Bazel 5.2.0 or higher. + to install Bazel 6.1.1 or higher. Option 2. Follow the official [Bazel documentation](https://docs.bazel.build/versions/master/install-bazelisk.html)