From b086de515913f21d97be88041a5971b711bd07d8 Mon Sep 17 00:00:00 2001 From: wojciechsromek Date: Tue, 23 Jul 2024 17:34:40 +0200 Subject: [PATCH] attempt at fixing the dockerfile --- .github/workflows/build-and-push.yaml | 3 +++ Dockerfile | 18 +++++------------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index 54cd3cb73..67cfef53f 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -1,6 +1,9 @@ name: Build and push docker image on: + push: + branches: + - "chore/fix-dockerfile" release: types: - 'published' diff --git a/Dockerfile b/Dockerfile index b674c984b..40983144d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]