1"""TensorFlow workspace initialization. Consult the WORKSPACE on how to use it."""
2
3load("//third_party/googleapis:repository_rules.bzl", "config_googleapis")
4load("//tensorflow:workspace.bzl", "tf_bind")
5load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
6load("@bazel_toolchains//repositories:repositories.bzl", bazel_toolchains_repositories = "repositories")
7load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies")
8load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
9load("@local_config_android//:android.bzl", "android_workspace")
10
11def workspace():
12    http_archive(
13        name = "inception_v1",
14        build_file = "//:models.BUILD",
15        sha256 = "7efe12a8363f09bc24d7b7a450304a15655a57a7751929b2c1593a71183bb105",
16        urls = [
17            "https://storage.googleapis.com/download.tensorflow.org/models/inception_v1.zip",
18        ],
19    )
20
21    http_archive(
22        name = "mobile_ssd",
23        build_file = "//:models.BUILD",
24        sha256 = "bddd81ea5c80a97adfac1c9f770e6f55cbafd7cce4d3bbe15fbeb041e6b8f3e8",
25        urls = [
26            "https://storage.googleapis.com/download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_android_export.zip",
27        ],
28    )
29
30    http_archive(
31        name = "mobile_multibox",
32        build_file = "//:models.BUILD",
33        sha256 = "859edcddf84dddb974c36c36cfc1f74555148e9c9213dedacf1d6b613ad52b96",
34        urls = [
35            "https://storage.googleapis.com/download.tensorflow.org/models/mobile_multibox_v1a.zip",
36        ],
37    )
38
39    http_archive(
40        name = "stylize",
41        build_file = "//:models.BUILD",
42        sha256 = "3d374a730aef330424a356a8d4f04d8a54277c425e274ecb7d9c83aa912c6bfa",
43        urls = [
44            "https://storage.googleapis.com/download.tensorflow.org/models/stylize_v1.zip",
45        ],
46    )
47
48    http_archive(
49        name = "speech_commands",
50        build_file = "//:models.BUILD",
51        sha256 = "c3ec4fea3158eb111f1d932336351edfe8bd515bb6e87aad4f25dbad0a600d0c",
52        urls = [
53            "https://storage.googleapis.com/download.tensorflow.org/models/speech_commands_v0.01.zip",
54        ],
55    )
56
57    http_archive(
58        name = "person_detect_data",
59        sha256 = "170542270da256994ce24d1e357f6e84a54fdaf7d28ff2b74725a40b70b082cf",
60        urls = [
61            "https://storage.googleapis.com/download.tensorflow.org/data/tf_lite_micro_person_data_grayscale_2020_05_24.zip",
62        ],
63    )
64
65    bazel_toolchains_repositories()
66
67    # Use `swift_rules_dependencies` to fetch the toolchains. With the
68    # `git_repository` rules above, the following call will skip redefining them.
69    swift_rules_dependencies()
70
71    android_workspace()
72
73    # If a target is bound twice, the later one wins, so we have to do tf bindings
74    # at the end of the WORKSPACE file.
75    tf_bind()
76
77    grpc_extra_deps()
78    config_googleapis()
79
80# Alias so it can be loaded without assigning to a different symbol to prevent
81# shadowing previous loads and trigger a buildifier warning.
82tf_workspace0 = workspace
83