From 2e4e95ad8cca4418a9d3a2fda17194a825daee41 Mon Sep 17 00:00:00 2001 From: Khanh Nguyen Date: Thu, 13 Aug 2026 10:54:58 +0700 Subject: [PATCH] fix CI errors in when compiling in linux and docker --- .github/workflows/release.yml | 2 +- CMakeLists.txt | 12 +++++++----- Dockerfile | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d4452a0..df97cdb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,7 +56,7 @@ jobs: wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb sudo dpkg -i cuda-keyring_1.1-1_all.deb sudo apt-get update -qq - sudo apt-get install -y -qq --no-install-recommends cuda-toolkit-12-6 + sudo apt-get install -y -qq --no-install-recommends cuda-toolkit-12-8 echo "/usr/local/cuda/bin" >> "$GITHUB_PATH" - name: build diff --git a/CMakeLists.txt b/CMakeLists.txt index 2062292..54fcca6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,16 +30,18 @@ set(LLAMA_BUILD_TOOLS ON CACHE BOOL "" FORCE) set(LLAMA_BUILD_SERVER OFF CACHE BOOL "" FORCE) set(LLAMA_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) set(LLAMA_BUILD_TESTS OFF CACHE BOOL "" FORCE) -# PATCH_COMMAND adds the CUDA extension hook; see scripts/patch_ggml_cuda_ext_hook.py. -find_package(Python3 COMPONENTS Interpreter REQUIRED) +set(_vla_llama_patch "") +if(GGML_CUDA) + find_package(Python3 COMPONENTS Interpreter REQUIRED) + set(_vla_llama_patch PATCH_COMMAND ${Python3_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/scripts/patch_ggml_cuda_ext_hook.py ) +endif() include(FetchContent) FetchContent_Declare(llama GIT_REPOSITORY https://github.com/ggml-org/llama.cpp GIT_TAG b10331 GIT_SHALLOW TRUE - PATCH_COMMAND ${Python3_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/scripts/patch_ggml_cuda_ext_hook.py - + ${_vla_llama_patch} ) FetchContent_MakeAvailable(llama) diff --git a/Dockerfile b/Dockerfile index f703649..a31dcd4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ARG BASE_IMAGE=nvidia/cuda:12.9.1-devel-ubuntu24.04 FROM ${BASE_IMAGE} RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - build-essential cmake git ca-certificates pkg-config \ + build-essential cmake git ca-certificates pkg-config python3 \ libzmq3-dev cppzmq-dev libprotobuf-dev protobuf-compiler \ && rm -rf /var/lib/apt/lists/*