diff --git a/devices/pc/default.nix b/devices/pc/default.nix index dc0be42e..c4de4956 100644 --- a/devices/pc/default.nix +++ b/devices/pc/default.nix @@ -115,6 +115,5 @@ inputs: ''; # 解决有时蓝牙不能使用的问题 boot.kernelParams = [ "mt7925e.disable_aspm=1" ]; - services.ollama = { environmentVariables = { HCC_AMDGPU_TARGET = "gfx1151"; OLLAMA_DEBUG = "2"; }; rocmOverrideGfx = "11.5.1"; }; }; } diff --git a/flake/lib/buildNixpkgsConfig/default.nix b/flake/lib/buildNixpkgsConfig/default.nix index 72b54e9e..9fcc9570 100644 --- a/flake/lib/buildNixpkgsConfig/default.nix +++ b/flake/lib/buildNixpkgsConfig/default.nix @@ -73,7 +73,6 @@ in platformConfig // google-chrome = prev.google-chrome.override (prev: { commandLineArgs = prev.commandLineArgs or "" + " --disable-features=GlobalShortcutsPortal"; }); xray = prev.xray.overrideAttrs (prev: { patches = prev.patches or [] ++ [ ./xray.patch ]; }); - ollama = prev.ollama.overrideAttrs (prev: { patches = prev.patches or [] ++ [ ./ollama.patch ]; }); } // ( let diff --git a/flake/lib/buildNixpkgsConfig/ollama.patch b/flake/lib/buildNixpkgsConfig/ollama.patch deleted file mode 100644 index 2bb9438d..00000000 --- a/flake/lib/buildNixpkgsConfig/ollama.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/discover/runner.go -+++ b/discover/runner.go -@@ -301,7 +301,7 @@ func GPUDevices(ctx context.Context, runners []ml.FilteredRunnerDiscovery) []ml. - - // Typical refresh on existing runner is ~500ms but allow longer if the system - // is under stress before giving up and using stale data. -- ctx, cancel := context.WithTimeout(ctx, 3*time.Second) -+ ctx, cancel := context.WithTimeout(ctx, 10*time.Second) - defer cancel() - start := time.Now() - updatedDevices := runner.GetDeviceInfos(ctx) -@@ -325,7 +325,7 @@ func GPUDevices(ctx context.Context, runners []ml.FilteredRunnerDiscovery) []ml. - - // Bootstrapping may take longer in some cases (AMD windows), but we - // would rather use stale free data to get the model running sooner -- ctx, cancel := context.WithTimeout(ctx, 3*time.Second) -+ ctx, cancel := context.WithTimeout(ctx, 10*time.Second) - defer cancel() - - // Apply any dev filters to avoid re-discovering unsupported devices, and get IDs correct