mirror of
https://github.com/NVIDIA/nccl-tests.git
synced 2026-04-23 16:08:20 +08:00
update Dockerfile
This commit is contained in:
parent
e115bd8517
commit
d5d08b99cc
@ -86,6 +86,7 @@ RUN git clone https://github.com/scitix/nccl-tests.git -b sicl && \
|
||||
make MPI=1 MPI_HOME=/usr/local/sihpc && \
|
||||
mkdir -p /usr/local/sihpc/libexec/nccl-tests && \
|
||||
cp -rf build/*_perf /usr/local/sihpc/libexec/nccl-tests/ && \
|
||||
mkdir -p /usr/local/sihpc/bin && \
|
||||
cp scripts/nccl_perf /usr/local/sihpc/bin/nccl_perf && \
|
||||
cp scripts/nccl_test /usr/local/sihpc/libexec/nccl-tests/nccl_test && \
|
||||
cp scripts/env.sh /usr/local/sihpc/env.sh && \
|
||||
@ -124,30 +125,15 @@ RUN cd /usr/local/sihpc/lib && \
|
||||
# ln -sf libltdl.so.7.3.1 libltdl.so.7 && \
|
||||
# ln -sf libltdl.so.7 libltdl.so
|
||||
|
||||
###########################
|
||||
# Package Stage
|
||||
###########################
|
||||
FROM ubuntu:20.04 AS package
|
||||
|
||||
# Re-declare args for this stage (values are inherited)
|
||||
ARG UBUNTU_VERSION
|
||||
ARG NCCL_PACKAGE_VERSION
|
||||
ARG MPI_VERSION
|
||||
ARG BUILD_DATE
|
||||
|
||||
# Expose versions/date as environment variables for runtime shell expansion
|
||||
ENV NCCL_PACKAGE_VERSION=${NCCL_PACKAGE_VERSION} \
|
||||
MPI_VERSION=${MPI_VERSION} \
|
||||
BUILD_DATE=${BUILD_DATE}
|
||||
|
||||
COPY --from=build /usr/local/sihpc /usr/local/sihpc
|
||||
|
||||
WORKDIR /
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends makeself && \
|
||||
chmod +x /usr/local/sihpc/bin/install_sihpc && \
|
||||
SAFE_NCCL_PKG=$(printf '%s\n' "${NCCL_PACKAGE_VERSION}" | tr '+' '-') && \
|
||||
RUN SAFE_NCCL_PKG=$(printf '%s\n' "${NCCL_PACKAGE_VERSION}" | tr '+' '-') && \
|
||||
PACKAGE_FILENAME="sicl-nccl${SAFE_NCCL_PKG}-ompi${MPI_VERSION}-ubuntu${UBUNTU_VERSION}-${BUILD_DATE}.run" && \
|
||||
makeself --gzip /usr/local/sihpc \
|
||||
"${PACKAGE_FILENAME}" \
|
||||
"SiHPC MPI + NCCL + NCCL-tests Portable Installer" \
|
||||
./bin/install_sihpc
|
||||
./bin/install_sihpc
|
||||
@ -72,7 +72,8 @@ RUN wget https://download.open-mpi.org/release/open-mpi/v${MPI_SERIES}/openmpi-$
|
||||
tar zxvf openmpi-${MPI_VERSION}.tar.gz && \
|
||||
cd openmpi-${MPI_VERSION} && \
|
||||
./configure --prefix=/usr/local/sihpc --with-cuda=/usr/local/cuda && \
|
||||
make -j$(nproc) && make install
|
||||
make -j$(nproc) && make install && \
|
||||
rm -rf /workspace/openmpi-${MPI_VERSION} /workspace/openmpi-${MPI_VERSION}.tar.gz
|
||||
|
||||
# -------------------------
|
||||
# 5. Build nccl-tests
|
||||
@ -87,7 +88,8 @@ RUN git clone https://github.com/scitix/nccl-tests.git -b sync/upstream-20251216
|
||||
cp scripts/nccl_test /usr/local/sihpc/libexec/nccl-tests/nccl_test && \
|
||||
cp scripts/env.sh /usr/local/sihpc/env.sh && \
|
||||
cp scripts/install_sihpc /usr/local/sihpc/bin/install_sihpc && \
|
||||
cp scripts/uninstall_sihpc /usr/local/sihpc/bin/uninstall_sihpc
|
||||
cp scripts/uninstall_sihpc /usr/local/sihpc/bin/uninstall_sihpc && \
|
||||
rm -rf /workspace/nccl-tests
|
||||
|
||||
# -------------------------
|
||||
# 6. Collect runtime libraries (strict selection)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user