Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile to reflect how to compile bnb from source #1437

Merged
merged 15 commits into from
Feb 7, 2024
Merged
7 changes: 3 additions & 4 deletions .github/workflows/build_docker_images.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Build Docker images (scheduled)

on:
workflow_dispatch:
workflow_call:
schedule:
- cron: "0 1 * * *"
push:
branches:
- younesbelkada-patch-2
younesbelkada marked this conversation as resolved.
Show resolved Hide resolved

concurrency:
group: docker-image-builds
Expand Down
9 changes: 5 additions & 4 deletions docker/peft-gpu-bnb-latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN chsh -s /bin/bash
SHELL ["/bin/bash", "-c"]

# Stage 2
FROM nvidia/cuda:12.2.2-devel-ubuntu22.04 AS build-image
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 AS build-image
COPY --from=compile-image /opt/conda /opt/conda
ENV PATH /opt/conda/bin:$PATH

Expand All @@ -40,7 +40,7 @@ SHELL ["/bin/bash", "-c"]

# Install apt libs
RUN apt-get update && \
apt-get install -y curl git wget && \
apt-get install -y curl git wget cmake && \
apt-get clean && \
rm -rf /var/lib/apt/lists*

Expand All @@ -57,8 +57,9 @@ RUN source activate peft && \
optimum \
auto-gptq && \
git clone https://github.com/TimDettmers/bitsandbytes && cd bitsandbytes && \
CUDA_VERSION=121 make cuda12x && \
python setup.py develop && \
cmake -B . -DCOMPUTE_BACKEND=cuda -S . && \
cmake --build . && \
pip install -e . && \
pip freeze | grep bitsandbytes

RUN echo "source activate peft" >> ~/.profile
Expand Down
9 changes: 5 additions & 4 deletions docker/peft-gpu-bnb-source/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN chsh -s /bin/bash
SHELL ["/bin/bash", "-c"]

# Stage 2
FROM nvidia/cuda:12.2.2-devel-ubuntu22.04 AS build-image
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 AS build-image
COPY --from=compile-image /opt/conda /opt/conda
ENV PATH /opt/conda/bin:$PATH

Expand All @@ -40,7 +40,7 @@ SHELL ["/bin/bash", "-c"]

# Install apt libs
RUN apt-get update && \
apt-get install -y curl git wget && \
apt-get install -y curl git wget cmake && \
apt-get clean && \
rm -rf /var/lib/apt/lists*

Expand All @@ -57,8 +57,9 @@ RUN source activate peft && \
optimum \
auto-gptq && \
git clone https://github.com/TimDettmers/bitsandbytes && cd bitsandbytes && \
CUDA_VERSION=121 make cuda12x && \
python setup.py develop && \
cmake -B . -DCOMPUTE_BACKEND=cuda -S . && \
cmake --build . && \
pip install -e . && \
pip freeze | grep bitsandbytes

RUN echo "source activate peft" >> ~/.profile
Expand Down
Loading