diff --git a/Dockerfile b/Dockerfile index a9ed5a959..503399a37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,14 +23,9 @@ RUN cargo install cargo-build-deps \ && cargo install cargo-edit FROM --platform=linux/amd64 build-image as build-app -RUN cargo new --bin gpu-iris-mpc WORKDIR /src/gpu-iris-mpc -COPY Cargo.toml Cargo.lock . -COPY benches ./benches -RUN cargo add criterion@0.5 -RUN cargo build-deps --release -COPY src ./src -RUN cargo build --release --target x86_64-unknown-linux-gnu +COPY . . +RUN cargo build --release --target x86_64-unknown-linux-gnu --bin server FROM --platform=linux/amd64 build-image as build-nccl ENV DEBIAN_FRONTEND=noninteractive @@ -42,11 +37,11 @@ RUN git clone https://github.com/NVIDIA/nccl.git && cd nccl && make -j4 pkg.debi FROM --platform=linux/amd64 ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive -COPY --from=build-app /src/gpu-iris-mpc/target/x86_64-unknown-linux-gnu/release/nccl /bin/nccl +COPY --from=build-app /src/gpu-iris-mpc/target/x86_64-unknown-linux-gnu/release/server /bin/server COPY --from=build-nccl /src/nccl/build/pkg/deb/libnccl*.deb /tmp COPY --from=build-nccl /src/cuda-keyring_1.1-1_all.deb /tmp RUN apt-get update && apt-get install -y libssl-dev ca-certificates \ && rm -rf /var/lib/apt/lists/* RUN dpkg -i /tmp/libnccl*.deb -ENTRYPOINT ["/bin/nccl"] +ENTRYPOINT ["/bin/server"]