Skip to content

Commit

Permalink
chore: docker build refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Wataru Ishida <[email protected]>
  • Loading branch information
ishidawataru committed Mar 11, 2024
1 parent 64ecce2 commit aba0631
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ FROM nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu22.04 AS nccl

RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -qy python3 openmpi-bin openmpi-common libibverbs-dev libopenmpi-dev autoconf libtool

COPY test test
COPY test/Makefile test/Makefile

COPY test/nccl test/nccl
RUN cd test && make build-nccl

COPY test/nccl-tests test/nccl-tests
RUN cd test && MPI_HOME=/usr/lib/x86_64-linux-gnu/openmpi make build-nccl-tests

COPY nccl_plugin nccl_plugin
Expand Down Expand Up @@ -35,6 +38,8 @@ RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -qy clang libibverb

COPY reduction_server reduction_server

FROM optcast AS optcast-bin

RUN cd reduction_server && cargo build -r

FROM optcast AS unittest
Expand All @@ -48,7 +53,7 @@ RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -qy --no-install-re

COPY --from=nccl /usr/local/lib /usr/local/lib
COPY --from=nccl test/nccl-tests/build/*_perf /usr/local/bin/
COPY --from=optcast reduction_server/target/release/optcast-reduction-server /usr/local/bin/optcast-reduction-server
COPY --from=optcast-bin reduction_server/target/release/optcast-reduction-server /usr/local/bin/optcast-reduction-server

ENV LD_LIBRARY_PATH=/usr/local/lib
ENV RUST_LOG=info

0 comments on commit aba0631

Please sign in to comment.