Merge pull request #298077 from ulrikstrid/ulrikstrid--rocm-6-ollama-2

ollama: Fix rocm runtime issues
This commit is contained in:
Pol Dellaiera 2024-03-24 08:09:55 +01:00 committed by GitHub
commit efbd32472c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 = [