Skip to content

Commit fee36d7

Browse files
vinhngxnarendasan
authored andcommitted
rename WORKSPACE
Signed-off-by: Vinh Nguyen <[email protected]>
1 parent 73a1eca commit fee36d7

File tree

1 file changed

+102
-0
lines changed

1 file changed

+102
-0
lines changed

notebooks/WORKSPACE.notebook

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
workspace(name = "TRTorch")
2+
3+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
5+
6+
git_repository(
7+
name = "rules_python",
8+
remote = "https://github.com/bazelbuild/rules_python.git",
9+
commit = "4fcc24fd8a850bdab2ef2e078b1de337eea751a6",
10+
shallow_since = "1589292086 -0400"
11+
)
12+
13+
load("@rules_python//python:repositories.bzl", "py_repositories")
14+
py_repositories()
15+
16+
load("@rules_python//python:pip.bzl", "pip_repositories", "pip3_import")
17+
pip_repositories()
18+
19+
http_archive(
20+
name = "rules_pkg",
21+
url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz",
22+
sha256 = "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a",
23+
)
24+
25+
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
26+
rules_pkg_dependencies()
27+
28+
# CUDA should be installed on the system locally
29+
new_local_repository(
30+
name = "cuda",
31+
path = "/usr/local/cuda-10.2/targets/x86_64-linux/",
32+
build_file = "@//third_party/cuda:BUILD",
33+
)
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+
43+
http_archive(
44+
name = "libtorch",
45+
build_file = "@//third_party/libtorch:BUILD",
46+
strip_prefix = "libtorch",
47+
urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.5.0.zip"],
48+
sha256 = "0efdd4e709ab11088fa75f0501c19b0e294404231442bab1d1fb953924feb6b5"
49+
)
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+
67+
## Downloaded distributions to use with --distdir
68+
#http_archive(
69+
# name = "cudnn",
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"],
71+
# build_file = "@//third_party/cudnn/archive:BUILD",
72+
# sha256 = "600267f2caaed2fd58eb214ba669d8ea35f396a7d19b94822e6b36f9f7088c20",
73+
# strip_prefix = "cuda"
74+
#)
75+
76+
#http_archive(
77+
# name = "tensorrt",
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"],
79+
# build_file = "@//third_party/tensorrt/archive:BUILD",
80+
# sha256 = "c7d73b2585b18aae68b740249efa8c8ba5ae852abe9a023720595432a8eb4efd",
81+
# strip_prefix = "TensorRT-7.0.0.11"
82+
#)
83+
84+
# Locally installed dependencies
85+
new_local_repository(
86+
name = "cudnn",
87+
path = "/usr/",
88+
build_file = "@//third_party/cudnn/local:BUILD"
89+
)
90+
91+
new_local_repository(
92+
name = "tensorrt",
93+
path = "/usr/",
94+
build_file = "@//third_party/tensorrt/local:BUILD"
95+
)
96+
97+
git_repository(
98+
name = "googletest",
99+
remote = "https://github.com/google/googletest",
100+
commit = "703bd9caab50b139428cea1aaff9974ebee5742e",
101+
shallow_since = "1570114335 -0400"
102+
)

0 commit comments

Comments
 (0)