Skip to content

Commit

Permalink
attempt at fixing the dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciechsromek committed Jul 23, 2024
1 parent 89ccdce commit b086de5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build and push docker image

on:
push:
branches:
- "chore/fix-dockerfile"
release:
types:
- 'published'
Expand Down
18 changes: 5 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,15 @@ WORKDIR /src/gpu-iris-mpc
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
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
&& dpkg -i cuda-keyring_1.1-1_all.deb \
&& apt-get update \
&& apt-get install -y cuda
RUN git clone https://github.com/NVIDIA/nccl.git && cd nccl && make -j4 pkg.debian.build

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/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 \
RUN apt-get update && apt-get install -y pkg-config wget libssl-dev ca-certificates \
&& rm -rf /var/lib/apt/lists/*

RUN dpkg -i /tmp/libnccl*.deb
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
&& dpkg -i cuda-keyring_1.1-1_all.deb \
&& apt-get update \
&& apt-get install -y cuda-toolkit-12-2 libnccl2 libnccl-dev

USER 65534
ENTRYPOINT ["/bin/server"]

0 comments on commit b086de5

Please sign in to comment.