DavHau / mach-nix

Create highly reproducible python environments
MIT License
853 stars 105 forks source link

mach-nix uses >1GB of memory? #457

Open edanaher opened 2 years ago

edanaher commented 2 years ago

Attempting to set up a configuration using mach-nix on a VPS with 3GB of RAM:

# nixos-rebuild build
building Nix...
building the system configuration...
unpacking 'https://github.com/DavHau/pypi-deps-db/tarball/da53397f0b782b0b18deb72ef8e0fb5aa7c98aa3'...
warning: dumping very large path (> 256 MiB); this may run out of memory
error: out of memory

I added some swap to fix this, and the nix-build process seemed to max out at 1.2GB. The host had over 2GB of RAM free, so I'm not sure why it failed, but it still seems ridiculous that simple resolving some python packages uses that much RAM.

I know this is probably an problem with how nix handles things, but it seems to me that mach-nix should be able to find a workaround.

TyberiusPrime commented 2 years ago

I can second this - had to resort to pushing configurations to my raspberry pi instead of evaluating them in situ.