From 00323f0a6fa58a42730d7a8c2331d0a467c46c2c Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Mon, 29 May 2023 08:06:22 -0400 Subject: [PATCH] fix CUDA_VERSION_BNB env var --- docker/Dockerfile-base | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile-base b/docker/Dockerfile-base index 6399d60ee..510d038ec 100644 --- a/docker/Dockerfile-base +++ b/docker/Dockerfile-base @@ -62,6 +62,7 @@ RUN git clone https://github.com/microsoft/DeepSpeed.git && \ FROM base-builder AS bnb-builder WORKDIR /workspace +ENV CUDA_VERSION_BNB=$CUDA_VERSION_BNB RUN git clone https://github.com/TimDettmers/bitsandbytes.git && \ cd bitsandbytes && \ @@ -70,6 +71,8 @@ RUN git clone https://github.com/TimDettmers/bitsandbytes.git && \ FROM base-builder +ENV CUDA_VERSION_BNB=$CUDA_VERSION_BNB + # recompile apex RUN python3 -m pip uninstall -y apex RUN git clone https://github.com/NVIDIA/apex @@ -90,7 +93,7 @@ COPY --from=flash-attn-builder /workspace/flash-attention/csrc/rotary/dist/rotar COPY --from=flash-attn-builder /workspace/flash-attention/csrc/layer_norm/dist/dropout_layer_norm-*.whl wheels RUN pip3 install wheels/deepspeed-*.whl wheels/flash_attn-*.whl wheels/fused_dense_lib-*.whl wheels/xentropy_cuda_lib-*.whl wheels/rotary_emb-*.whl wheels/dropout_layer_norm-*.whl -RUN cd /workspace/builds/bitsandbytes && cp bitsandbytes/libbitsandbytes_cuda.so bitsandbytes/libbitsandbytes_cuda${CUDA_VERSION_BNB}.so && python3 setup.py install +RUN cd /workspace/builds/bitsandbytes && python3 setup.py install RUN git lfs install --skip-repo RUN pip3 install "peft @ git+https://github.com/huggingface/peft.git@main" \ "accelerate @ git+https://github.com/huggingface/accelerate.git@main" \