Unverified Commit fb061834 authored by Pavol Rusnak's avatar Pavol Rusnak Committed by GitHub
Browse files

ollama: 0.21.0 -> 0.21.1 (#512728)

parents ed95a6be cd973234
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ let

  cudaToolkit = buildEnv {
    # ollama hardcodes the major version in the Makefile to support different variants.
    # - https://github.com/ollama/ollama/blob/v0.21.0/CMakePresets.json#L21-L47
    # - https://github.com/ollama/ollama/blob/v0.21.1/CMakePresets.json#L21-L47
    name = "cuda-merged-${cudaMajorVersion}";
    paths = map lib.getLib cudaLibs ++ [
      (lib.getOutput "static" cudaPackages.cuda_cudart)
@@ -141,13 +141,13 @@ let
in
goBuild (finalAttrs: {
  pname = "ollama";
  version = "0.21.0";
  version = "0.21.1";

  src = fetchFromGitHub {
    owner = "ollama";
    repo = "ollama";
    tag = "v${finalAttrs.version}";
    hash = "sha256-DtrYopNtndQXq9Xjriw5Bqell9A8RHPOvgDF8BlKtdU=";
    hash = "sha256-t/c2oba/y1IUh460+P3MQHGLnExrKcOcQpiMg0mFLBs=";
  };

  vendorHash = "sha256-Lc1Ktdqtv2VhJQssk8K1UOimeEjVNvDWePE9WkamCos=";
@@ -199,6 +199,10 @@ goBuild (finalAttrs: {
      --replace-fail '/bin/mkdir' '${coreutils}/bin/mkdir' \
      --replace-fail '/bin/cat' '${coreutils}/bin/cat' \
      --replace-fail '/bin/chmod' '${coreutils}/bin/chmod'
    substituteInPlace cmd/launch/kimi_test.go \
       --replace-fail '/bin/mkdir' '${coreutils}/bin/mkdir' \
       --replace-fail '/bin/cat' '${coreutils}/bin/cat' \
       --replace-fail '/bin/chmod' '${coreutils}/bin/chmod'
    rm -r app
  ''
  # disable tests that fail in sandbox due to Metal init failure
@@ -241,7 +245,7 @@ goBuild (finalAttrs: {
    '';

  # ollama looks for acceleration libs in ../lib/ollama/ (now also for CPU-only with arch specific optimizations)
  # https://github.com/ollama/ollama/blob/v0.21.0/docs/development.md#library-detection
  # https://github.com/ollama/ollama/blob/v0.21.1/docs/development.md#library-detection
  postInstall = ''
    mkdir -p $out/lib
    cp -r build/lib/ollama $out/lib/