From 6db125b377d5fd9d252b67638f757d30f83831ba Mon Sep 17 00:00:00 2001 From: Jefferson Fialho Date: Wed, 18 Dec 2024 18:07:11 -0300 Subject: [PATCH] install numactl to enable fastsafetensors and adapter for 0.6.5 Signed-off-by: Jefferson Fialho --- Dockerfile.ubi | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Dockerfile.ubi b/Dockerfile.ubi index 8bb80a299ccc4..a5e2c94b6dd3c 100644 --- a/Dockerfile.ubi +++ b/Dockerfile.ubi @@ -50,6 +50,20 @@ ENV CUDA_HOME="/usr/local/cuda" \ PATH="${CUDA_HOME}/bin:${PATH}" \ LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${CUDA_HOME}/extras/CUPTI/lib64:${LD_LIBRARY_PATH}" +# Install necessary packages to build numactl from source +RUN microdnf install -y autoconf automake libtool make rpm-build + +# Download the numactl source RPM to /root directory +WORKDIR /root +RUN microdnf download --enablerepo=ubi-9-baseos-source --source numactl.src + +# Get NUMACTL_V (just the version part of the RPM file) +RUN NUMACTL_V=$(ls /root/numactl-* | sed -r 's|/root/numactl-(.+)\.el9\.src\.rpm|\1|') && \ + echo "########################################### NUMACTL_V is set to $NUMACTL_V" && \ + rpm -i /root/numactl-${NUMACTL_V}.el9.src.rpm && \ + rpmbuild -ba /root/rpmbuild/SPECS/numactl.spec && \ + rpm -i /root/rpmbuild/RPMS/x86_64/{numactl-libs-${NUMACTL_V}.el9.x86_64.rpm,numactl-${NUMACTL_V}.el9.x86_64.rpm,numactl-devel-${NUMACTL_V}.el9.x86_64.rpm} + ## Python cuda base ################################################################# FROM cuda-base AS python-cuda-base @@ -206,10 +220,15 @@ FROM vllm-openai as vllm-grpc-adapter USER root +RUN --mount=type=bind,from=cuda-base,source=/root/rpmbuild/RPMS/x86_64,target=/tmp/rpm/ \ + rpm -i --nodeps /tmp/rpm/numactl-libs-*.el9.x86_64.rpm + RUN --mount=type=cache,target=/root/.cache/pip \ --mount=type=cache,target=/root/.cache/uv \ --mount=type=bind,from=build,src=/workspace/dist,target=/workspace/dist \ - HOME=/root uv pip install "$(echo /workspace/dist/*.whl)[tensorizer]" vllm-tgis-adapter==0.5.3 + HOME=/root uv pip install "$(echo /workspace/dist/*.whl)[tensorizer]" + +RUN pip install git+https://github.com/opendatahub-io/vllm-tgis-adapter.git@vllm0p6p5 ENV GRPC_PORT=8033 \ PORT=8000 \