Skip to content

Commit 365dabe

Browse files
committed
chore: Upgrade bazel version
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 272a9c7 commit 365dabe

File tree

5 files changed

+25
-37
lines changed

5 files changed

+25
-37
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.1
1+
5.1.1

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN rm -rf /opt/pytorch/torch_tensorrt /usr/bin/bazel
99

1010
ARG ARCH="x86_64"
1111
ARG TARGETARCH="amd64"
12-
ARG BAZEL_VERSION=4.2.1
12+
ARG BAZEL_VERSION=5.1.1
1313

1414
RUN [[ "$TARGETARCH" == "amd64" ]] && ARCH="x86_64" || ARCH="${TARGETARCH}" \
1515
&& wget -q https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-${ARCH} -O /usr/bin/bazel \

docker/Dockerfile.docs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ FROM nvcr.io/nvidia/tensorrt:22.01-py3
33
RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add -
44
RUN echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
55

6-
RUN apt-get update && apt-get install -y bazel-4.2.1 clang-format-9 libjpeg9 libjpeg9-dev
7-
RUN ln -s /usr/bin/bazel-4.2.1 /usr/bin/bazel
6+
RUN apt-get update && apt-get install -y bazel-5.1.1 clang-format-9 libjpeg9 libjpeg9-dev
7+
RUN ln -s /usr/bin/bazel-5.1.1 /usr/bin/bazel
88
RUN ln -s $(which clang-format-9) /usr/bin/clang-format
99

1010
# Workaround for bazel expecting both static and shared versions, we only use shared libraries inside container

docker/WORKSPACE.docs

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,32 @@ workspace(name = "Torch-TensorRT")
33
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
55

6-
git_repository(
6+
http_archive(
77
name = "rules_python",
8-
remote = "https://github.com/bazelbuild/rules_python.git",
9-
commit = "4fcc24fd8a850bdab2ef2e078b1de337eea751a6",
10-
shallow_since = "1589292086 -0400"
8+
sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f",
9+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
1110
)
1211

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()
12+
load("@rules_python//python:pip.bzl", "pip_install")
1813

1914
http_archive(
2015
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",
16+
sha256 = "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d",
17+
urls = [
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",
20+
],
2321
)
2422

2523
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
24+
2625
rules_pkg_dependencies()
2726

2827
git_repository(
2928
name = "googletest",
30-
remote = "https://github.com/google/googletest",
3129
commit = "703bd9caab50b139428cea1aaff9974ebee5742e",
32-
shallow_since = "1570114335 -0400"
30+
remote = "https://github.com/google/googletest",
31+
shallow_since = "1570114335 -0400",
3332
)
3433

3534
# CUDA should be installed on the system locally
@@ -52,17 +51,17 @@ new_local_repository(
5251
http_archive(
5352
name = "libtorch",
5453
build_file = "@//third_party/libtorch:BUILD",
55-
sha256 = "190e963e739d5f7c2dcf94b3994de8fcd335706a4ebb333812ea7d8c841beb06",
54+
sha256 = "8d9e829ce9478db4f35bdb7943308cf02e8a2f58cf9bb10f742462c1d57bf287",
5655
strip_prefix = "libtorch",
57-
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-cxx11-abi-shared-with-deps-1.10.0%2Bcu113.zip"],
56+
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-cxx11-abi-shared-with-deps-1.11.0%2Bcu113.zip"],
5857
)
5958

6059
http_archive(
6160
name = "libtorch_pre_cxx11_abi",
6261
build_file = "@//third_party/libtorch:BUILD",
63-
sha256 = "0996a6a4ea8bbc1137b4fb0476eeca25b5efd8ed38955218dec1b73929090053",
62+
sha256 = "90159ecce3ff451f3ef3f657493b6c7c96759c3b74bbd70c1695f2ea2f81e1ad",
6463
strip_prefix = "libtorch",
65-
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-shared-with-deps-1.10.0%2Bcu113.zip"],
64+
urls = ["https://download.pytorch.org/libtorch/cu113/libtorch-shared-with-deps-1.11.0%2Bcu113.zip"],
6665
)
6766

6867
####################################################################################
@@ -84,18 +83,7 @@ new_local_repository(
8483
#########################################################################
8584
# Testing Dependencies (optional - comment out on aarch64)
8685
#########################################################################
87-
pip3_import(
88-
name = "torch_tensorrt_py_deps",
89-
requirements = "//py:requirements.txt"
90-
)
91-
92-
load("@torch_tensorrt_py_deps//:requirements.bzl", "pip_install")
93-
pip_install()
94-
95-
pip3_import(
96-
name = "py_test_deps",
97-
requirements = "//tests/py:requirements.txt"
98-
)
99-
100-
load("@py_test_deps//:requirements.bzl", "pip_install")
101-
pip_install()
86+
pip_install(
87+
name = "pylinter_deps",
88+
requirements = "//tools/linter:requirements.txt",
89+
)

docker/setup_nox.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -e
77
post=${1:-""}
88

99
# fetch bazel executable
10-
BAZEL_VERSION=4.2.1
10+
BAZEL_VERSION=5.1.1
1111
ARCH=$(uname -m)
1212
if [[ "$ARCH" == "aarch64" ]]; then ARCH="arm64"; fi
1313
wget -q https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-${ARCH} -O /usr/bin/bazel

0 commit comments

Comments
 (0)