I agree with the other commenters, this post does not explain why you would not just run Ollama or Koboldcpp on Windows. What exactly makes running Ollama within virtualized NixOS in WSL in some way better than running natively?
If it's just the novelty aspect of it or some idealogical reason, that's fine, but it should be explained in the blog post before someone thinks this is a sane and logical way to run Ollama on a gaming PC.
I would dare guess the author just doesn’t know there is a perfectly functional Windows native Ollama release. I was doing the same thing until I realized that it makes no sense because I can just install ollama on Windows and then connect to it from within WSL.
As others have already pointed out if you're going to run Ollama in Windows anyway, why not use the native build? And if you want to use WSL, then I'd suggest using something like LocalAI which gives you a lot more control and support for additional formats (GGML, GGUF, GPTQ, ONNX, etc).
it's unclear to me what you gain running ollama in wsl like this compared to switching to a productive native operating system [like nixos] or just installing the windows release of ollama and quietly forgetting about it.
i use nixos.wsl at work to have the same emacs configuration as on my laptop, and that's fine except the windows filesystem performance makes me want to throw the whole system in a dumpster. but on my home gaming machine i have some games that only run on windows so i just installed ollama's windows installer which works with my GPU and installs an autostart entry.
these days the windows box sits in a dark corner on my network with tailscale (again just the windows install), running sunshine too to start steam games on my laptop.
I use ChatGPT for most practical stuff but I really enjoy running local models. I find it really interesting and I think it's important for people to know how to run these without being beholden to big tech. If you have a used 3090 you can already run some really strong models. There are some really interesting local models as well, like the abliterated ones.
I recently gave this another go, and was pleasantly surprised that I could install Steam easily, the nVidia card was detected and driver installed, and I quickly installed the "Resident Evil 4" remake with awesome performance and no glitchiness
Then I rebooted my system and found that Steam had broken Gnome and I couldn't log in and had to go into safe mode and debug from the command line. 1 hour in, 1 thing installed.
I love the idea of this flake to run Ollama even on Windows, but just pointing people to your _everything_ flake is going to confuse people and make it look harder than it is to run Ollama on Nix.
If you are using a system-controlling Nix (nix-darwin, NixOS…), it’s as easy as `hardware.services.ollama.enable=true` with maybe adding `.acceleration=“cuda”` to force GPU usage or `host=“0.0.0.0”` to allow connections to Ollama that are not local to your system. In a home-manager situation it is even easier: just include `pkgs.ollama` in your `home.packages`, with an `.override{}` for the same options above. That should be it, really.
I will say that if you have a more complex NixOS setup that patches the kernel or can’t lean on cachix for some reason that using the ollama package takes a long time to compile. My setup at home runs on a 3950X Threadripper and when Ollama compiles it uses all the cores at 99% for about 16 minutes.
I've been running an ollama and deepseek in a container in TrueNAS k8s for several months. It's hooked up to my Continue extension in VSCode. I also mix it with cloud hosted "dumb" ones for other tasks like code completion. Ollama deepseek is reserved for heavier chat and code tasks.
It's fast as hell. Though you will need at least two GPUs to divide between ollama and if need something else(display/game/proxmox) to use it.
Nvidia never fixed their sysmem fallback policy for wsl2 though, running on wsl2 rather than native Windows just spell so much performance problems when VRAM overflows
That's what mine does as it's a gaming PC secondarily.... that being said I am running in to some limitations i.e. certain Sim Racing titles and VR Support (though both ALVR and WiVRN are excellent)
amiantos|10 months ago
If it's just the novelty aspect of it or some idealogical reason, that's fine, but it should be explained in the blog post before someone thinks this is a sane and logical way to run Ollama on a gaming PC.
neuroelectron|10 months ago
elwebmaster|10 months ago
vunderba|10 months ago
https://github.com/mudler/LocalAI
razemio|10 months ago
- reproducible (with minor adjustments even on non-WSL systems)
- if you are used to nix, there is not much which beats it in terms of stability, maintainability, upgradability, and fun (?)
- additional services are typically easier to set up like tailscale-acl, used by the author, which uses pulumi under the hood
- despite some downsides (disc speed was an issue when I used it), WSL is surprisingly capable
baq|10 months ago
nanozuki|10 months ago
magicalhippo|10 months ago
It would make more sense for AMD I suppose where Ollama's Windows support is lacking compared to Linux.
That said, neat tricks useful for other stuff as well.
laserbeam|10 months ago
rrix2|10 months ago
i use nixos.wsl at work to have the same emacs configuration as on my laptop, and that's fine except the windows filesystem performance makes me want to throw the whole system in a dumpster. but on my home gaming machine i have some games that only run on windows so i just installed ollama's windows installer which works with my GPU and installs an autostart entry.
these days the windows box sits in a dark corner on my network with tailscale (again just the windows install), running sunshine too to start steam games on my laptop.
emsign|10 months ago
borisk|10 months ago
Running locally has a lot of advantages - privacy, getting to learn how to run LLMs, not having to deal with quotas, logins, outages.
chpatrick|10 months ago
sterlind|10 months ago
calaphos|10 months ago
Way better utilization of expensive hardware as well ofc.
cma|10 months ago
hnfong|10 months ago
Havoc|10 months ago
Bet being that I can get most games to work on it - that was the sticking point. (Thanks to Valve I think it’ll work out)
tempoponet|10 months ago
Then I rebooted my system and found that Steam had broken Gnome and I couldn't log in and had to go into safe mode and debug from the command line. 1 hour in, 1 thing installed.
I'll try again in 10 years.
Carrok|10 months ago
johnisgood|10 months ago
IHLayman|10 months ago
If you are using a system-controlling Nix (nix-darwin, NixOS…), it’s as easy as `hardware.services.ollama.enable=true` with maybe adding `.acceleration=“cuda”` to force GPU usage or `host=“0.0.0.0”` to allow connections to Ollama that are not local to your system. In a home-manager situation it is even easier: just include `pkgs.ollama` in your `home.packages`, with an `.override{}` for the same options above. That should be it, really.
I will say that if you have a more complex NixOS setup that patches the kernel or can’t lean on cachix for some reason that using the ollama package takes a long time to compile. My setup at home runs on a 3950X Threadripper and when Ollama compiles it uses all the cores at 99% for about 16 minutes.
mertleee|10 months ago
itissid|10 months ago
It's fast as hell. Though you will need at least two GPUs to divide between ollama and if need something else(display/game/proxmox) to use it.
pipyakas|10 months ago
shmerl|10 months ago
lvturner|10 months ago
WD-42|10 months ago
> I refused to manage a separate Ubuntu box that would need reconfiguring from scratch.
Immediately followed by:
> After hacking away at it for a number of weeks
Hmmm
rob_c|10 months ago
DeathArrow|10 months ago
unknown|10 months ago
[deleted]
dopa42365|10 months ago
>LLM
stinky