@@ -3,17 +3,17 @@ workspace(name = "TRTorch")
33load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
44load ("@bazel_tools//tools/build_defs/repo:git.bzl" , "git_repository" )
55
6-
7- http_archive (
6+ git_repository (
87 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"
1111)
1212
1313load ("@rules_python//python:repositories.bzl" , "py_repositories" )
1414py_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 " )
1717pip_repositories ()
1818
1919http_archive (
@@ -32,6 +32,14 @@ new_local_repository(
3232 build_file = "@//third_party/cuda:BUILD" ,
3333)
3434
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+
3543http_archive (
3644 name = "libtorch" ,
3745 build_file = "@//third_party/libtorch:BUILD" ,
@@ -40,20 +48,34 @@ http_archive(
4048 sha256 = "0efdd4e709ab11088fa75f0501c19b0e294404231442bab1d1fb953924feb6b5"
4149)
4250
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+
4367# Downloaded distributions to use with --distdir
4468http_archive (
4569 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" ],
4871 build_file = "@//third_party/cudnn/archive:BUILD" ,
4972 sha256 = "600267f2caaed2fd58eb214ba669d8ea35f396a7d19b94822e6b36f9f7088c20" ,
5073 strip_prefix = "cuda"
5174)
5275
5376http_archive (
5477 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" ],
5779 build_file = "@//third_party/tensorrt/archive:BUILD" ,
5880 sha256 = "c7d73b2585b18aae68b740249efa8c8ba5ae852abe9a023720595432a8eb4efd" ,
5981 strip_prefix = "TensorRT-7.0.0.11"
0 commit comments