diff --git a/docker/Dockerfile-base b/docker/Dockerfile-base index 6fbe00ddf..ed024ced9 100644 --- a/docker/Dockerfile-base +++ b/docker/Dockerfile-base @@ -66,6 +66,8 @@ FROM base-builder AS bnb-builder WORKDIR /workspace ARG CUDA="118" ENV CUDA=$CUDA +ARG MAX_JOBS="-1" +ENV MAX_JOBS=$MAX_JOBS RUN git clone https://github.com/TimDettmers/bitsandbytes.git && \ cd bitsandbytes && \ @@ -80,8 +82,7 @@ ENV TORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST # recompile apex RUN python3 -m pip uninstall -y apex RUN git clone https://github.com/NVIDIA/apex -# `MAX_JOBS=1` disables parallel building to avoid cpu memory OOM when building image on GitHub Action (standard) runners -RUN cd apex && MAX_JOBS=1 python3 -m pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./ +RUN cd apex && python3 -m pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./ RUN mkdir -p /workspace/builds COPY --from=bnb-builder /workspace/bitsandbytes /workspace/builds/bitsandbytes