-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix nccl regression on PyTorch 2.3 upgrade #2099
Changes from all commits
2502ce4
a76b6f4
27a3792
62a1ddb
a1695ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,9 @@ RUN cargo build --profile release-opt | |
# Adapted from: https://github.com/pytorch/pytorch/blob/master/Dockerfile | ||
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 as pytorch-install | ||
|
||
# NOTE: When updating PyTorch version, beware to remove `pip install nvidia-nccl-cu12==2.22.3` below in the Dockerfile. Context: https://github.com/huggingface/text-generation-inference/pull/2099 | ||
ARG PYTORCH_VERSION=2.3.0 | ||
|
||
ARG PYTHON_VERSION=3.10 | ||
# Keep in sync with `server/pyproject.toml | ||
ARG CUDA_VERSION=12.1 | ||
|
@@ -232,7 +234,10 @@ COPY server/Makefile server/Makefile | |
RUN cd server && \ | ||
make gen-server && \ | ||
pip install -r requirements_cuda.txt && \ | ||
pip install ".[bnb, accelerate, quantize, peft, outlines]" --no-cache-dir | ||
pip install ".[bnb, accelerate, quantize, peft, outlines]" --no-cache-dir && \ | ||
pip install nvidia-nccl-cu12==2.22.3 | ||
|
||
ENV LD_PRELOAD=/opt/conda/lib/python3.10/site-packages/nvidia/nccl/lib/libnccl.so.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need to preload? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Otherwise, the shared object is not used. The current base docker image of TGI is |
||
|
||
# Deps before the binaries | ||
# The binaries change on every build given we burn the SHA into them | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would have liked to use pyproject.toml for that, but poetry disapproves of conflict handling python-poetry/poetry#697 (comment)