diff --git a/docker/Dockerfile.20.07 b/docker/Dockerfile.20.07 index 3a1d49ce76..54daf25fdd 100644 --- a/docker/Dockerfile.20.07 +++ b/docker/Dockerfile.20.07 @@ -14,6 +14,9 @@ COPY . /workspace/TRTorch RUN rm /workspace/TRTorch/WORKSPACE COPY ./docker/WORKSPACE.cu11.docker /workspace/TRTorch/WORKSPACE +# Workaround for bazel expecting both static and shared versions, we only use shared libraries inside container +RUN cp /usr/lib/x86_64-linux-gnu/libnvinfer.so /usr/lib/x86_64-linux-gnu/libnvinfer_static.a + WORKDIR /workspace/TRTorch RUN bazel build //:libtrtorch --compilation_mode opt diff --git a/third_party/tensorrt/local/BUILD b/third_party/tensorrt/local/BUILD index 69f54d8246..dfbe5a3c4a 100644 --- a/third_party/tensorrt/local/BUILD +++ b/third_party/tensorrt/local/BUILD @@ -68,8 +68,9 @@ cc_import( "//conditions:default": "lib/x86_64-linux-gnu/libnvinfer.so", }), static_library = select({ + ":aarch64_linux": "lib/aarch64-linux-gnu/libnvinfer_static.a", ":windows": "lib/nvinfer.lib", - "//conditions:default": "" + "//conditions:default": "lib/x86_64-linux-gnu/libnvinfer_static.a" }), visibility = ["//visibility:private"], )