Skip to content

Commit

Permalink
Merge pull request #298575 from abysssol/ollama-tidy
Browse files Browse the repository at this point in the history
ollama: fix a symlink and use a smaller rocm path
  • Loading branch information
drupol committed Mar 24, 2024
2 parents 4baf0ed + ea8ab5b commit 2e1b779
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkgs/tools/misc/ollama/default.nix
Expand Up @@ -68,6 +68,10 @@ let
cudaPackages.cudatoolkit
cudaPackages.cuda_cudart
];
postBuild = ''
rm "$out/lib64"
ln -s "lib" "$out/lib64"
'';
};

runtimeLibs = lib.optionals enableRocm [
Expand Down Expand Up @@ -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 = [
Expand Down

0 comments on commit 2e1b779

Please sign in to comment.