Skip to content

Commit

Permalink
fix(//docker): Workaround only shared libraries being available in
Browse files Browse the repository at this point in the history
PyTorch container

Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
  • Loading branch information
narendasan committed Aug 25, 2020
1 parent 970d775 commit 50c7eda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docker/Dockerfile.20.07
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion third_party/tensorrt/local/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
Expand Down

0 comments on commit 50c7eda

Please sign in to comment.