Add sandboxed version of nix-portable with tweaks to run on marenostrum #236
Reference in New Issue
Block a user
Delete Branch "abonerib/jungle:nix-portable"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Modified nix-portable to run without requiring host's programs to run. Instead, we install all we need through nix (either bundled statically in
nix-portableor throughnixin the first run).Ran
bsc.ci.alland all works except amd-uprof dowloadEDIT: it took ~8minutes with
--substituters "" jungle#bsc.ci.all -L --max-jobs 8Some minor issues:
bwrapdoes not play well with thesgidin/gpfs/{scratch,projects}causing permission errors when sources are downloaded.$NP_LOCATION/.nix-portabletobsc, but it will break if subfolders where already created with the bit.Cannot download AMD uprof (fixed output derivation). No internet in sandbox?fetchurlinstead ofrunCommandnix --helpThis should prevent issues when putting it under /gpfs/{projects,scratch} that have sgid and group=nobody.c84ccb0652to871aab5b96871aab5b96to9c44010fb5@@ -0,0 +213,4 @@echo "extra-trusted-public-keys = jungle.bsc.es:pEc7MlAT0HEwLQYPtpkPLwRsGf80ZI26aj29zMw/HH0=" >> \$dir/conf/nix.confecho "extra-system-features = sys-devices" >> \$dir/conf/nix.confecho "extra-sandbox-paths = /sys/devices/system/cpu=/sys/devices/system/cpu /sys/devices/system/node=/sys/devices/system/node" >> \$dir/conf/nix.confThis should be conditional on the
sys-devicesfeature being enabled, as it is done inprograms.nix-required-mounts.9c44010fb5todcdbcc5afadcdbcc5afatod2672716f4@@ -42,1 +27,3 @@'';src = fetchurl {url = "https://download.amd.com/developer/eula/uprof/uprof-5-1/${tarball}";sha256 = "sha256-j9gxcBcIg6Zhc5FglUXf/VV9bKSo+PAKeootbN7ggYk=";Checked that it still works with
nix build .#amd-uprof.src --rebuildd2672716f4toaa0c778a9baa0c778a9bto4d3e5ebba3WIP: Add sandboxed version of nix-portable with tweaks to run on marenostrumto Add sandboxed version of nix-portable with tweaks to run on marenostrum4d3e5ebba3to2dbfeed817Thanks a lot!, this is very useful. I just left a nitpick to keep the overlay.nix with one line per package.
I tested it in glogin4 and it seems to work well so far. I would keep it for now for "experienced users" and see later if we can have a zero-configuration (or near zero) for newcomers. For that we would need to test MPI as well and make sure /usr and /lib is not present at run time, among other things.
@@ -45,0 +47,4 @@xz = final.pkgsStatic.xz;zstd = final.pkgsStatic.zstd;bashInteractive = final.pkgsStatic.bashInteractive;};Could we pass
pkgs = finaland take those from inside the derivation input arguments? That way we can keep the definition in one line and they are still overridable if needed.Changed to use
<pkgname>Staticthis should allow overrides and keep the overlay clean.Decided to remove
prootsince the static version did not build.The only difference is that now we use the native zstd instead of the static one:
19b1862606to54dfaa9dff