Skip to content

Commit 50c7eda

Browse files
committed
fix(//docker): Workaround only shared libraries being available in
PyTorch container Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 970d775 commit 50c7eda

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: docker/Dockerfile.20.07

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ COPY . /workspace/TRTorch
1414
RUN rm /workspace/TRTorch/WORKSPACE
1515
COPY ./docker/WORKSPACE.cu11.docker /workspace/TRTorch/WORKSPACE
1616

17+
# Workaround for bazel expecting both static and shared versions, we only use shared libraries inside container
18+
RUN cp /usr/lib/x86_64-linux-gnu/libnvinfer.so /usr/lib/x86_64-linux-gnu/libnvinfer_static.a
19+
1720
WORKDIR /workspace/TRTorch
1821
RUN bazel build //:libtrtorch --compilation_mode opt
1922

Diff for: third_party/tensorrt/local/BUILD

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ cc_import(
6868
"//conditions:default": "lib/x86_64-linux-gnu/libnvinfer.so",
6969
}),
7070
static_library = select({
71+
":aarch64_linux": "lib/aarch64-linux-gnu/libnvinfer_static.a",
7172
":windows": "lib/nvinfer.lib",
72-
"//conditions:default": ""
73+
"//conditions:default": "lib/x86_64-linux-gnu/libnvinfer_static.a"
7374
}),
7475
visibility = ["//visibility:private"],
7576
)

0 commit comments

Comments
 (0)