@@ -4,93 +4,86 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
55
66http_archive(
7- name = "rules_python",
8- url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz ",
9- sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f ",
10- )
7+ name = "rules_python",
8+ sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f ",
9+ url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz ",
10+ )
1111
1212load("@rules_python//python:pip.bzl", "pip_install")
1313
1414http_archive(
1515 name = "rules_pkg",
16+ sha256 = "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d",
1617 urls = [
17- "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz",
18- "https://github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz",
18+ "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz",
19+ "https://github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz",
1920 ],
20- sha256 = "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d",
2121)
22+
2223load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
24+
2325rules_pkg_dependencies()
2426
2527git_repository(
2628 name = "googletest",
27- remote = "https://github.com/google/googletest",
2829 commit = "703bd9caab50b139428cea1aaff9974ebee5742e",
29- shallow_since = "1570114335 -0400"
30- )
31-
32- # External dependency for torch_tensorrt if you already have precompiled binaries.
33- # This is currently used in pytorch NGC container CI testing.
34- local_repository(
35- name = "torch_tensorrt",
36- path = "/opt/conda/lib/python3.8/site-packages/torch_tensorrt"
30+ remote = "https://github.com/google/googletest",
31+ shallow_since = "1570114335 -0400",
3732)
3833
3934# CUDA should be installed on the system locally
4035new_local_repository(
4136 name = "cuda",
42- path = "/usr/local/cuda",
37+ path = "/usr/local/cuda/ ",
4338 build_file = "@//third_party/cuda:BUILD",
4439)
4540
4641new_local_repository(
4742 name = "cublas",
48- build_file = "@//third_party/cublas:BUILD",
4943 path = "/usr",
44+ build_file = "@//third_party/cublas:BUILD",
5045)
5146
52- ####################################################################################
53- # Locally installed dependencies (use in cases of custom dependencies or aarch64 )
54- ####################################################################################
47+ #############################################################################################################
48+ # Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs )
49+ #############################################################################################################
5550
56- new_local_repository (
51+ http_archive (
5752 name = "libtorch",
58- path = "/opt/conda/lib/python3.8/site-packages/torch",
59- build_file = "third_party/libtorch/BUILD"
53+ build_file = "@//third_party/libtorch:BUILD",
54+ sha256 = "8d9e829ce9478db4f35bdb7943308cf02e8a2f58cf9bb10f742462c1d57bf287",
55+ strip_prefix = "libtorch",
56+ urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-cxx11-abi-shared-with-deps-1.11.0%2Bcu113.zip"],
6057)
6158
62- new_local_repository (
59+ http_archive (
6360 name = "libtorch_pre_cxx11_abi",
64- path = "/opt/conda/lib/python3.8/site-packages/torch",
65- build_file = "third_party/libtorch/BUILD"
61+ build_file = "@//third_party/libtorch:BUILD",
62+ sha256 = "90159ecce3ff451f3ef3f657493b6c7c96759c3b74bbd70c1695f2ea2f81e1ad",
63+ strip_prefix = "libtorch",
64+ urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-shared-with-deps-1.11.0%2Bcu113.zip"],
6665)
6766
67+ ####################################################################################
68+ # Locally installed dependencies (use in cases of custom dependencies or aarch64)
69+ ####################################################################################
70+
6871new_local_repository(
6972 name = "cudnn",
7073 path = "/usr/",
7174 build_file = "@//third_party/cudnn/local:BUILD"
7275)
7376
7477new_local_repository(
75- name = "tensorrt",
76- path = "/usr/",
77- build_file = "@//third_party/tensorrt/local:BUILD"
78+ name = "tensorrt",
79+ path = "/usr/",
80+ build_file = "@//third_party/tensorrt/local:BUILD"
7881)
7982
8083#########################################################################
8184# Testing Dependencies (optional - comment out on aarch64)
8285#########################################################################
83- pip_install(
84- name = "torch_tensorrt_py_deps",
85- requirements = "//py:requirements.txt",
86- )
87-
88- pip_install(
89- name = "py_test_deps",
90- requirements = "//tests/py:requirements.txt",
91- )
92-
9386pip_install(
9487 name = "pylinter_deps",
9588 requirements = "//tools/linter:requirements.txt",
96- )
89+ )
0 commit comments