@@ -3,17 +3,17 @@ workspace(name = "TRTorch")
3
3
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
-
7
- http_archive (
6
+ git_repository (
8
7
name = "rules_python" ,
9
- url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz" ,
10
- sha256 = "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161" ,
8
+ remote = "https://github.com/bazelbuild/rules_python.git" ,
9
+ commit = "4fcc24fd8a850bdab2ef2e078b1de337eea751a6" ,
10
+ shallow_since = "1589292086 -0400"
11
11
)
12
12
13
13
load ("@rules_python//python:repositories.bzl" , "py_repositories" )
14
14
py_repositories ()
15
- # Only needed if using the packaging rules.
16
- load ("@rules_python//python:pip.bzl" , "pip_repositories" , "pip_import " )
15
+
16
+ load ("@rules_python//python:pip.bzl" , "pip_repositories" , "pip3_import " )
17
17
pip_repositories ()
18
18
19
19
http_archive (
@@ -32,6 +32,14 @@ new_local_repository(
32
32
build_file = "@//third_party/cuda:BUILD" ,
33
33
)
34
34
35
+ http_archive (
36
+ name = "libtorch_pre_cxx11_abi" ,
37
+ build_file = "@//third_party/libtorch:BUILD" ,
38
+ strip_prefix = "libtorch" ,
39
+ sha256 = "ea8de17c5f70015583f3a7a43c7a5cdf91a1d4bd19a6a7bc11f074ef6cd69e27" ,
40
+ urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.0.zip" ],
41
+ )
42
+
35
43
http_archive (
36
44
name = "libtorch" ,
37
45
build_file = "@//third_party/libtorch:BUILD" ,
@@ -40,20 +48,34 @@ http_archive(
40
48
sha256 = "0efdd4e709ab11088fa75f0501c19b0e294404231442bab1d1fb953924feb6b5"
41
49
)
42
50
51
+ pip3_import (
52
+ name = "trtorch_py_deps" ,
53
+ requirements = "//py:requirements.txt"
54
+ )
55
+
56
+ load ("@trtorch_py_deps//:requirements.bzl" , "pip_install" )
57
+ pip_install ()
58
+
59
+ pip3_import (
60
+ name = "py_test_deps" ,
61
+ requirements = "//tests/py:requirements.txt"
62
+ )
63
+
64
+ load ("@py_test_deps//:requirements.bzl" , "pip_install" )
65
+ pip_install ()
66
+
43
67
# Downloaded distributions to use with --distdir
44
68
http_archive (
45
69
name = "cudnn" ,
46
- urls = ["https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.2_20191118/cudnn-10.2-linux-x64-v7.6.5.32.tgz" ,],
47
-
70
+ urls = ["https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.2_20191118/cudnn-10.2-linux-x64-v7.6.5.32.tgz" ],
48
71
build_file = "@//third_party/cudnn/archive:BUILD" ,
49
72
sha256 = "600267f2caaed2fd58eb214ba669d8ea35f396a7d19b94822e6b36f9f7088c20" ,
50
73
strip_prefix = "cuda"
51
74
)
52
75
53
76
http_archive (
54
77
name = "tensorrt" ,
55
- urls = ["https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/7.0/7.0.0.11/tars/TensorRT-7.0.0.11.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn7.6.tar.gz" ,],
56
-
78
+ urls = ["https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/7.0/7.0.0.11/tars/TensorRT-7.0.0.11.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn7.6.tar.gz" ],
57
79
build_file = "@//third_party/tensorrt/archive:BUILD" ,
58
80
sha256 = "c7d73b2585b18aae68b740249efa8c8ba5ae852abe9a023720595432a8eb4efd" ,
59
81
strip_prefix = "TensorRT-7.0.0.11"
0 commit comments