@@ -4,93 +4,86 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4
4
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
5
5
6
6
http_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
+ )
11
11
12
12
load("@rules_python//python:pip.bzl", "pip_install")
13
13
14
14
http_archive(
15
15
name = "rules_pkg",
16
+ sha256 = "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d",
16
17
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",
19
20
],
20
- sha256 = "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d",
21
21
)
22
+
22
23
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
24
+
23
25
rules_pkg_dependencies()
24
26
25
27
git_repository(
26
28
name = "googletest",
27
- remote = "https://github.com/google/googletest",
28
29
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",
37
32
)
38
33
39
34
# CUDA should be installed on the system locally
40
35
new_local_repository(
41
36
name = "cuda",
42
- path = "/usr/local/cuda",
37
+ path = "/usr/local/cuda/ ",
43
38
build_file = "@//third_party/cuda:BUILD",
44
39
)
45
40
46
41
new_local_repository(
47
42
name = "cublas",
48
- build_file = "@//third_party/cublas:BUILD",
49
43
path = "/usr",
44
+ build_file = "@//third_party/cublas:BUILD",
50
45
)
51
46
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
+ #############################################################################################################
55
50
56
- new_local_repository (
51
+ http_archive (
57
52
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"],
60
57
)
61
58
62
- new_local_repository (
59
+ http_archive (
63
60
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"],
66
65
)
67
66
67
+ ####################################################################################
68
+ # Locally installed dependencies (use in cases of custom dependencies or aarch64)
69
+ ####################################################################################
70
+
68
71
new_local_repository(
69
72
name = "cudnn",
70
73
path = "/usr/",
71
74
build_file = "@//third_party/cudnn/local:BUILD"
72
75
)
73
76
74
77
new_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"
78
81
)
79
82
80
83
#########################################################################
81
84
# Testing Dependencies (optional - comment out on aarch64)
82
85
#########################################################################
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
-
93
86
pip_install(
94
87
name = "pylinter_deps",
95
88
requirements = "//tools/linter:requirements.txt",
96
- )
89
+ )
0 commit comments