Unverified Commit 5fea7ad9 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

ollama: fix rocm build (#344236)

parents 492e9179 194b237e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -157,6 +157,9 @@ goBuild {
    # this also disables necessary patches contained in `ollama/llm/patches/`
    # those patches are applied in `postPatch`
    ./disable-git.patch

    # we provide our own deps at runtime
    ./skip-rocm-cp.patch
  ];

  postPatch = ''
+14 −0
Original line number Diff line number Diff line
diff --git a/llm/generate/gen_linux.sh b/llm/generate/gen_linux.sh
index 48d08fd0..e50f7b36 100755
--- a/llm/generate/gen_linux.sh
+++ b/llm/generate/gen_linux.sh
@@ -284,9 +284,6 @@ if [ -z "${OLLAMA_SKIP_ROCM_GENERATE}" -a -d "${ROCM_PATH}" ]; then
     mkdir -p "${ROCM_DIST_DIR}"
     for dep in $(ldd "${BUILD_DIR}/bin/ollama_llama_server" | grep "=>" | cut -f2 -d= | cut -f2 -d' ' | grep -v "${GOARCH}/rocm${ROCM_VARIANT}" | grep -e rocm -e amdgpu -e libtinfo -e libnuma -e libelf ); do
         cp -a "${dep}"* "${ROCM_DIST_DIR}"
-        if [ $(readlink -f "${dep}") != "${dep}" ] ; then
-            cp $(readlink -f "${dep}") "${ROCM_DIST_DIR}"
-        fi
     done
     install
     dist