Skip to content

Commit ef52c84

Browse files
authored
vLLM backend SBSA build (#8142)
1 parent 6c6df11 commit ef52c84

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

build.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,13 +1484,24 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach
14841484
ARG BUILD_PUBLIC_VLLM="true"
14851485
ARG VLLM_INDEX_URL
14861486
ARG PYTORCH_TRITON_URL
1487+
ARG NVPL_SLIM_URL
14871488
14881489
RUN --mount=type=secret,id=req,target=/run/secrets/requirements \\
14891490
if [ "$BUILD_PUBLIC_VLLM" = "false" ]; then \\
1490-
pip3 install --no-cache-dir \\
1491-
mkl==2021.1.1 \\
1492-
mkl-include==2021.1.1 \\
1493-
mkl-devel==2021.1.1 \\
1491+
if [ "$(uname -m)" = "x86_64" ]; then \\
1492+
pip3 install --no-cache-dir \\
1493+
mkl==2021.1.1 \\
1494+
mkl-include==2021.1.1 \\
1495+
mkl-devel==2021.1.1; \\
1496+
elif [ "$(uname -m)" = "aarch64" ]; then \\
1497+
echo "Downloading NVPL from: $NVPL_SLIM_URL" && \\
1498+
cd /tmp && \\
1499+
wget -O nvpl_slim_24.04.tar $NVPL_SLIM_URL && \\
1500+
tar -xf nvpl_slim_24.04.tar && \\
1501+
cp -r nvpl_slim_24.04/lib/* /usr/local/lib && \\
1502+
cp -r nvpl_slim_24.04/include/* /usr/local/include && \\
1503+
rm -rf nvpl_slim_24.04.tar nvpl_slim_24.04; \\
1504+
fi \\
14941505
&& pip3 install --no-cache-dir --progress-bar on --index-url $VLLM_INDEX_URL -r /run/secrets/requirements \\
14951506
# Need to install in-house build of pytorch-triton to support triton_key definition used by torch 2.5.1
14961507
&& cd /tmp \\
@@ -1893,6 +1904,7 @@ def create_docker_build_script(script_name, container_install_dir, container_ci_
18931904
f"--build-arg VLLM_INDEX_URL={vllm_index_url}",
18941905
f"--build-arg PYTORCH_TRITON_URL={pytorch_triton_url}",
18951906
f"--build-arg BUILD_PUBLIC_VLLM={build_public_vllm}",
1907+
f"--build-arg NVPL_SLIM_URL={nvpl_slim_url}",
18961908
]
18971909
finalargs += [
18981910
"-t",
@@ -2883,6 +2895,7 @@ def enable_all():
28832895
requirements = secrets.get("req", "")
28842896
vllm_index_url = secrets.get("vllm_index_url", "")
28852897
pytorch_triton_url = secrets.get("pytorch_triton_url", "")
2898+
nvpl_slim_url = secrets.get("nvpl_slim_url", "")
28862899
build_public_vllm = secrets.get("build_public_vllm", "true")
28872900
log('Build Arg for BUILD_PUBLIC_VLLM: "{}"'.format(build_public_vllm))
28882901

0 commit comments

Comments
 (0)