Merge pull request #298575 from abysssol/ollama-tidy

ollama: fix a symlink and use a smaller rocm path
This commit is contained in:
Pol Dellaiera 2024-03-24 15:31:10 +01:00 committed by GitHub
commit 2e1b779e0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -68,6 +68,10 @@ let
cudaPackages.cudatoolkit
cudaPackages.cuda_cudart
];
postBuild = ''
rm "$out/lib64"
ln -s "lib" "$out/lib64"
'';
};
runtimeLibs = lib.optionals enableRocm [
@ -166,7 +170,7 @@ goBuild ((lib.optionalAttrs enableRocm {
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}' '' + lib.optionalString enableRocm ''\
--set-default HIP_PATH ${pkgs.rocmPackages.meta.rocm-hip-libraries}
--set-default HIP_PATH ${rocmPath}
'';
ldflags = [