1
0
Fork 0

add sudo for llvm installation and sample run script

This commit is contained in:
Mikhail Goncharov 2023-01-30 12:48:19 +01:00
parent 41f6b6d5c2
commit 39264db819
2 changed files with 18 additions and 2 deletions

View file

@ -8,13 +8,15 @@ RUN echo 'intall packages'; \
cmake gdb build-essential \ cmake gdb build-essential \
ninja-build \ ninja-build \
libelf-dev libffi-dev gcc-multilib \ libelf-dev libffi-dev gcc-multilib \
# for llvm-libc tests that build mpfr and gmp from source # for llvm-libc tests that build mpfr and gmp from source
autoconf automake libtool \ autoconf automake libtool \
ccache \ ccache \
python3 python3-psutil \ python3 python3-psutil \
python3-pip python3-setuptools \ python3-pip python3-setuptools \
lsb-release software-properties-common \ lsb-release software-properties-common \
swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq; swig python3-dev libedit-dev libncurses5-dev libxml2-dev liblzma-dev golang rsync jq \
# for llvm installation script
sudo;
# LLVM must be installed after prerequsite packages. # LLVM must be installed after prerequsite packages.
ENV LLVM_VERSION=15 ENV LLVM_VERSION=15
@ -31,6 +33,7 @@ RUN echo 'install llvm ${LLVM_VERSION}'; \
ln -s /usr/bin/clang-format-${LLVM_VERSION} /usr/bin/clang-format;\ ln -s /usr/bin/clang-format-${LLVM_VERSION} /usr/bin/clang-format;\
ln -s /usr/bin/clang-format-diff-${LLVM_VERSION} /usr/bin/clang-format-diff;\ ln -s /usr/bin/clang-format-diff-${LLVM_VERSION} /usr/bin/clang-format-diff;\
ln -s /usr/bin/lld-${LLVM_VERSION} /usr/bin/lld;\ ln -s /usr/bin/lld-${LLVM_VERSION} /usr/bin/lld;\
ln -s /usr/bin/lldb-${LLVM_VERSION} /usr/bin/lldb;\
ln -s /usr/bin/ld.lld-${LLVM_VERSION} /usr/bin/ld.lld ln -s /usr/bin/ld.lld-${LLVM_VERSION} /usr/bin/ld.lld
RUN echo 'configure locale'; \ RUN echo 'configure locale'; \

View file

@ -0,0 +1,13 @@
# Sample script that you can run in docker container to build vllm
#!/usr/bin/env bash
su buildkite-agent
cd /var/lib/buildkite-agent
git clone https://github.com/llvm-premerge-tests/llvm-project.git llvm-project
cd llvm-project
rm -rf build
mkdir build
cd build
export CC="clang"
export CXX="clang++"
export LD="LLD"
cmake ../llvm -D LLVM_ENABLE_PROJECTS="clang;mlir;lldb;llvm" -G Ninja -D CMAKE_BUILD_TYPE=Release -D LLVM_ENABLE_ASSERTIONS=ON -D LLVM_BUILD_EXAMPLES=ON -D LLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml" -D LLVM_ENABLE_LLD=ON -D CMAKE_CXX_FLAGS=-gmlt -DBOLT_CLANG_EXE=/usr/bin/clang