From 83088add63691020394df7bc541a142f376f56f0 Mon Sep 17 00:00:00 2001 From: FrankLeeeee Date: Mon, 10 Jul 2023 10:50:32 +0800 Subject: [PATCH 1/2] [docker] fixed ninja build command --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 97399c939376..148d063fd0a0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get update && \ RUN conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch # install ninja -RUN apt-get install -y --no-install-recommends ninja-build +RUN apt-get update && apt-get install -y --no-install-recommends ninja-build # install apex RUN git clone https://github.com/NVIDIA/apex && \ @@ -31,7 +31,7 @@ RUN git clone https://github.com/NVIDIA/apex && \ pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--fast_layer_norm" ./ # install colossalai -ARG VERSION=1 +ARG VERSION=main RUN git clone -b ${VERSION} https://github.com/hpcaitech/ColossalAI.git \ && cd ./ColossalAI \ && CUDA_EXT=1 pip install -v --no-cache-dir . From f3d6435784b4312999a5314407938e08a1985563 Mon Sep 17 00:00:00 2001 From: FrankLeeeee Date: Mon, 10 Jul 2023 11:47:22 +0800 Subject: [PATCH 2/2] polish code --- docker/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 148d063fd0a0..a1e136ee58a5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -21,7 +21,10 @@ RUN apt-get update && \ RUN conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch # install ninja -RUN apt-get update && apt-get install -y --no-install-recommends ninja-build +RUN apt-get update && \ + apt-get install -y --no-install-recommends ninja-build && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* # install apex RUN git clone https://github.com/NVIDIA/apex && \