ollama: fix a symlink and use a smaller rocm path

This commit is contained in:
abysssol 2024-03-24 04:18:59 -04:00
parent ddd523bd82
commit ea8ab5ba8e

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