Skip to content

Commit

Permalink
Revert "Using alternative managed symbolic links for library paths (#…
Browse files Browse the repository at this point in the history
…4982)"

This reverts commit f036cb0.
  • Loading branch information
mc-nv committed Nov 10, 2022
1 parent b6d2581 commit e19d20e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ def create_dockerfile_linux(ddir, dockerfile_name, argmap, backends, repoagents,
# stage of the PyTorch backend
if not FLAGS.enable_gpu and ('pytorch' in backends):
df += '''
RUN patchelf --add-needed /usr/local/cuda/lib64/stubs/libcublasLt.so backends/pytorch/libtorch_cuda.so
RUN patchelf --add-needed /usr/local/cuda/lib64/stubs/libcublasLt.so.11 backends/pytorch/libtorch_cuda.so
'''

with open(os.path.join(ddir, dockerfile_name), "w") as dfile:
Expand Down Expand Up @@ -1093,21 +1093,21 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu,
cuda_arch = 'sbsa' if target_machine == 'aarch64' else 'x86_64'
df += '''
RUN mkdir -p /usr/local/cuda/lib64/stubs
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcusparse.so /usr/local/cuda/lib64/stubs/.
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcusolver.so /usr/local/cuda/lib64/stubs/.
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcurand.so /usr/local/cuda/lib64/stubs/.
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcufft.so /usr/local/cuda/lib64/stubs/.
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcublas.so /usr/local/cuda/lib64/stubs/.
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcublasLt.so /usr/local/cuda/lib64/stubs/.
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcusparse.so /usr/local/cuda/lib64/stubs/libcusparse.so.11
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcusolver.so /usr/local/cuda/lib64/stubs/libcusolver.so.11
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcurand.so /usr/local/cuda/lib64/stubs/libcurand.so.10
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcufft.so /usr/local/cuda/lib64/stubs/libcufft.so.10
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcublas.so /usr/local/cuda/lib64/stubs/libcublas.so.11
COPY --from=min_container /usr/local/cuda/lib64/stubs/libcublasLt.so /usr/local/cuda/lib64/stubs/libcublasLt.so.11
RUN mkdir -p /usr/local/cuda/targets/{cuda_arch}-linux/lib
COPY --from=min_container /usr/local/cuda/targets/{cuda_arch}-linux/lib/libcudart.so /usr/local/cuda/targets/{cuda_arch}-linux/lib/.
COPY --from=min_container /usr/local/cuda/targets/{cuda_arch}-linux/lib/libcupti.so /usr/local/cuda/targets/{cuda_arch}-linux/lib/.
COPY --from=min_container /usr/local/cuda/targets/{cuda_arch}-linux/lib/libnvToolsExt.so /usr/local/cuda/targets/{cuda_arch}-linux/lib/.
COPY --from=min_container /usr/local/cuda-11.8/targets/{cuda_arch}-linux/lib/libcudart.so.11.0 /usr/local/cuda/targets/{cuda_arch}-linux/lib/.
COPY --from=min_container /usr/local/cuda-11.8/targets/{cuda_arch}-linux/lib/libcupti.so.11.8 /usr/local/cuda/targets/{cuda_arch}-linux/lib/.
COPY --from=min_container /usr/local/cuda-11.8/targets/{cuda_arch}-linux/lib/libnvToolsExt.so.1 /usr/local/cuda/targets/{cuda_arch}-linux/lib/.
COPY --from=min_container /usr/lib/{libs_arch}-linux-gnu/libcudnn.so /usr/lib/{libs_arch}-linux-gnu/libcudnn.so
COPY --from=min_container /usr/lib/{libs_arch}-linux-gnu/libcudnn.so.8 /usr/lib/{libs_arch}-linux-gnu/libcudnn.so.8
# patchelf is needed to add deps of libcublasLt.so to libtorch_cuda.so
# patchelf is needed to add deps of libcublasLt.so.11 to libtorch_cuda.so
RUN apt-get update && \
apt-get install -y --no-install-recommends openmpi-bin patchelf
Expand All @@ -1122,7 +1122,7 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu,
# this dependency is not present in the ubuntu base image, we must
# copy it from the Triton min container ourselves.
df += '''
COPY --from=min_container /usr/lib/{libs_arch}-linux-gnu/libnccl.so /usr/lib/{libs_arch}-linux-gnu/libnccl.so
COPY --from=min_container /usr/lib/{libs_arch}-linux-gnu/libnccl.so.2 /usr/lib/{libs_arch}-linux-gnu/libnccl.so.2
'''.format(libs_arch=libs_arch)

# Add dependencies needed for python backend
Expand Down

0 comments on commit e19d20e

Please sign in to comment.