From a3a552232d065cdf6e5634a117432c85dc7c8b66 Mon Sep 17 00:00:00 2001 From: FlyPanda Date: Mon, 22 Dec 2025 09:00:38 +0800 Subject: [PATCH] [feature] support hicache-3fs usrbio lib build for ubuntu24.04 (#15230) --- .../mem_cache/storage/hf3fs/docs/README.md | 45 +++++++++++++------ 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/python/sglang/srt/mem_cache/storage/hf3fs/docs/README.md b/python/sglang/srt/mem_cache/storage/hf3fs/docs/README.md index 54f776489..2423b7135 100644 --- a/python/sglang/srt/mem_cache/storage/hf3fs/docs/README.md +++ b/python/sglang/srt/mem_cache/storage/hf3fs/docs/README.md @@ -15,21 +15,38 @@ The Usrbio client is required for accessing 3FS. Install it in your SGLang Pod u **Alternative 1 (Recommend):** Built from the source code, the following provides quick installation commands (refer to [setup_usrbio_client.md](setup_usrbio_client.md)) ``` +set -e; \ +. /etc/os-release; \ +case "$VERSION_ID" in \ + "22.04") \ + CLANG_VERSION="14"; \ + GIT_BRANCH=main; \ + GIT_COMMIT_ID=6f029c439d0d22995900ca357d51b37975c6ffb5; \ + ;; \ + "24.04") \ + CLANG_VERSION="18"; \ + GIT_BRANCH="ubuntu24.04"; \ + GIT_COMMIT_ID=d0cf83a42395cdb2a66d3ce83cb0a11a46bee9f3; \ + ;; \ + *) \ + echo "Unsupported Ubuntu version: $VERSION_ID"; \ + exit 1; \ + ;; \ +esac; \ apt-get update && apt-get install -y --no-install-recommends \ - clang-format-14 clang-14 clang-tidy-14 lld-14 meson google-perftools \ - libaio-dev libdouble-conversion-dev libdwarf-dev libgflags-dev libgmock-dev libgoogle-perftools-dev liblz4-dev liblzma-dev libuv1-dev \ - && rm -rf /var/lib/apt/lists/* \ - apt-get clean - -git clone https://github.com/deepseek-ai/3fs 3fs \ - && cd 3fs \ - && git checkout 6f029c439d0d22995900ca357d51b37975c6ffb5 \ - && git submodule update --init --recursive \ - && ./patches/apply.sh \ - && CMAKE_BUILD_PARALLEL_LEVEL=32 python3 setup.py bdist_wheel -d dist \ - && pip install dist/*.whl \ - && cd .. \ - && rm -rf 3fs + clang-format-$CLANG_VERSION clang-$CLANG_VERSION clang-tidy-$CLANG_VERSION lld-$CLANG_VERSION meson google-perftools \ + libaio-dev libdouble-conversion-dev libdwarf-dev libgflags-dev libgmock-dev libgoogle-perftools-dev liblz4-dev liblzma-dev libuv1-dev \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean \ + && git clone https://github.com/novitalabs/3FS.git -b $GIT_BRANCH 3fs \ + && cd 3fs \ + && git checkout $GIT_COMMIT_ID \ + && git submodule update --init --recursive \ + && ./patches/apply.sh \ + && CMAKE_BUILD_PARALLEL_LEVEL=32 python3 setup.py bdist_wheel -d dist \ + && pip install dist/*.whl \ + && cd .. \ + && rm -rf 3fs export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python3.12/dist-packages ```