forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 28
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
[Misc] Upload a shell for bare-metal #268
Open
Concurrensee
wants to merge
6
commits into
main
Choose a base branch
from
for-bare-metal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d0084de
shell for bare-metal
Concurrensee 93bf762
Update install-vlllm-for-bare-metal.sh
Concurrensee 61bed5f
Merge branch 'main' into for-bare-metal
Concurrensee cdb6cdc
Merge branch 'main' into for-bare-metal
Concurrensee 6c7a90c
Rename install-vlllm-for-bare-metal.sh to install-vllm-for-bare-metal.sh
Concurrensee 1bc82a1
a markdown
Concurrensee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
#!/usr/bin/env bash | ||
|
||
# READ BEFORE USE: | ||
# This script helps to install vllm on bare-metal. The time it takes is in term of hours. | ||
|
||
# The script default installs pytorch and vllm, and assumes rocm and its environment has been installed. | ||
# The vllm also has other dependencies, if you find something is missing you can uncomment certain script block to install. | ||
# Make sure the vllm whl to install is in the same directory as this script. | ||
# The script may also pull some repository in current directory, you can delete them after installation. | ||
|
||
# To test on vllm installation: run some examples in vllm/examples. | ||
|
||
|
||
|
||
|
||
|
||
# # Install some basic utilities | ||
# apt-get update -q -y && apt-get install -q -y python3 python3-pip | ||
# apt-get update -q -y && apt-get install -q -y sqlite3 libsqlite3-dev libfmt-dev libmsgpack-dev libsuitesparse-dev | ||
# # Remove sccache | ||
# python3 -m pip install --upgrade pip | ||
# apt-get purge -y sccache; python3 -m pip uninstall -y sccache; rm -f "$(which sccache)" | ||
|
||
|
||
# # local build environment | ||
# export PYTORCH_ROCM_ARCH="gfx90a;gfx942" | ||
# export LLVM_SYMBOLIZER_PATH="/opt/rocm/llvm/bin/llvm-symbolizer" | ||
# export PATH="$PATH:/opt/rocm/bin:/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/bin:" | ||
# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/rocm/lib/:/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/lib:" | ||
# export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/include:/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/:/opt/rocm/include/:" | ||
|
||
|
||
# python3 -m pip install --upgrade pip && rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
# # optional numpy update | ||
# case "$(which python3)" in \ | ||
# *"/opt/conda/envs/py_3.9"*) \ | ||
# rm -rf /opt/conda/envs/py_3.9/lib/python3.9/site-packages/numpy-1.20.3.dist-info/;; \ | ||
# *) ;; esac | ||
|
||
|
||
# # optional flash-attention installation | ||
# FA_BRANCH="3cea2fb" | ||
# pip uninstall -y flash-attn | ||
# git clone https://github.com/ROCm/flash-attention.git | ||
# cd flash-attention | ||
# git checkout $FA_BRANCH | ||
# git submodule update --init | ||
# GPU_ARCHS=${PYTORCH_ROCM_ARCH} python3 setup.py bdist_wheel --dist-dir=dist | ||
# pip install dist/*.whl | ||
# cd .. | ||
|
||
|
||
# # optional triton installation | ||
# pip uninstall -y triton \ | ||
# && python3 -m pip install ninja cmake wheel pybind11 && git clone https://github.com/triton-lang/triton.git \ | ||
# && cd triton \ | ||
# && git checkout e192dba \ | ||
# && cd python \ | ||
# && python3 setup.py bdist_wheel --dist-dir=dist \ | ||
# && pip install dist/*.whl \ | ||
# && cd .. && cd .. | ||
|
||
|
||
# pytorch installation | ||
pip uninstall -y torch torchvision \ | ||
&& git clone https://github.com/ROCm/pytorch.git pytorch \ | ||
&& cd pytorch && git checkout cedc116 && git submodule update --init --recursive \ | ||
&& python3 tools/amd_build/build_amd.py \ | ||
&& CMAKE_PREFIX_PATH=$(python3 -c 'import sys; print(sys.prefix)') python3 setup.py bdist_wheel --dist-dir=dist \ | ||
&& pip install dist/*.whl \ | ||
&& cd .. \ | ||
&& git clone https://github.com/pytorch/vision.git vision \ | ||
&& cd vision && git checkout v0.19.1 \ | ||
&& python3 setup.py bdist_wheel --dist-dir=dist \ | ||
&& pip install dist/*.whl \ | ||
&& cd .. | ||
|
||
|
||
# # optional huggingface installation | ||
# python3 -m pip install --upgrade huggingface-hub[cli] | ||
|
||
|
||
# # optional profile installation | ||
# git clone -b nvtx_enabled https://github.com/ROCm/rocmProfileData.git \ | ||
# && cd rocmProfileData/rpd_tracer \ | ||
# && pip install -r requirements.txt && cd ../ \ | ||
# && make && make install \ | ||
# && cd hipMarker && python setup.py install \ | ||
# && cd ../.. | ||
|
||
|
||
# Install vLLM (and gradlib) | ||
pip install -U -r requirements-rocm.txt \ | ||
&& pip uninstall -y vllm gradlib \ | ||
&& pip install *.whl | ||
|
||
|
||
# cd /opt/rocm/share/amd_smi \ | ||
# && pip wheel . --wheel-dir=dist \ | ||
# && pip install dist/*.whl \ | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This block of code lacks initial comment.
I guess it is pretty self-explanatory, but to be persistent in style, let's add a small comment there as well.