Skip to content

Commit

Permalink
Merge pull request #103 from worldcoin/feat-update-dockerfile
Browse files Browse the repository at this point in the history
feat: update dockerfile
  • Loading branch information
jazzbee authored Jul 11, 2024
2 parents a6e0f33 + 666608d commit 12dd9ee
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]

0 comments on commit 12dd9ee

Please sign in to comment.