Skip to content

Commit

Permalink
fix CUDA_VERSION_BNB env var
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed May 29, 2023
1 parent 7f7fd68 commit 00323f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker/Dockerfile-base
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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
Expand All @@ -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" \
Expand Down

0 comments on commit 00323f0

Please sign in to comment.