ollama: Fix rocm runtime issues

This commit is contained in:
Ulrik Strid 2024-03-21 16:58:04 +01:00
parent dfe95bf220
commit 99ca7e3aa6

View File

@ -165,7 +165,8 @@ goBuild ((lib.optionalAttrs enableRocm {
# expose runtime libraries necessary to use the gpu
mv "$out/bin/ollama" "$out/bin/.ollama-unwrapped"
makeWrapper "$out/bin/.ollama-unwrapped" "$out/bin/ollama" \
--suffix LD_LIBRARY_PATH : '/run/opengl-driver/lib:${lib.makeLibraryPath runtimeLibs}'
--suffix LD_LIBRARY_PATH : '/run/opengl-driver/lib:${lib.makeLibraryPath runtimeLibs}' '' + lib.optionalString enableRocm ''\
--set-default HIP_PATH ${pkgs.rocmPackages.meta.rocm-hip-libraries}
'';
ldflags = [