forked from opea-project/GenAIComps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable vLLM Gaudi support for LLM service based on officially habana …
…vllm release (opea-project#137) Signed-off-by: tianyil1 <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: gadmarkovits <[email protected]>
- Loading branch information
1 parent
e47a148
commit ad4cf7e
Showing
6 changed files
with
91 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (c) 2024 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Set default values | ||
default_hw_mode="cpu" | ||
|
||
# Assign arguments to variable | ||
hw_mode=${1:-$default_hw_mode} | ||
|
||
# Check if all required arguments are provided | ||
if [ "$#" -lt 0 ] || [ "$#" -gt 1 ]; then | ||
echo "Usage: $0 [hw_mode]" | ||
echo "Please customize the arguments you want to use. | ||
- hw_mode: The hardware mode for the Ray Gaudi endpoint, with the default being 'cpu', and the optional selection can be 'cpu' and 'hpu'." | ||
exit 1 | ||
fi | ||
|
||
# Build the docker image for vLLM based on the hardware mode | ||
if [ "$hw_mode" = "hpu" ]; then | ||
docker build -f docker/Dockerfile.hpu -t vllm:hpu --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy | ||
else | ||
git clone https://github.com/vllm-project/vllm.git | ||
cd ./vllm/ | ||
docker build -f Dockerfile.cpu -t vllm:cpu --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM vault.habana.ai/gaudi-docker/1.16.0/ubuntu22.04/habanalabs/pytorch-installer-2.2.2:latest | ||
|
||
ENV LANG=en_US.UTF-8 | ||
|
||
WORKDIR /root | ||
|
||
RUN pip install --upgrade-strategy eager optimum[habana] | ||
|
||
RUN pip install -v git+https://github.com/HabanaAI/vllm-fork.git@ae3d6121 | ||
|
||
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \ | ||
service ssh restart | ||
|
||
ENV no_proxy=localhost,127.0.0.1 | ||
|
||
ENV PT_HPU_LAZY_ACC_PAR_MODE=0 | ||
|
||
ENV PT_HPU_ENABLE_LAZY_COLLECTIVES=true | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters