Installing Flox in a (Singularity) container

I’m attempting to use Flox on an HPC system (so no root permissions). Rather than just use the existing one, I’d like to add flox to our standard one, which I’m naively attempting by having:

        sudo dpkg -i flox-1.0.1.x86_64-linux.deb

run as part of the build. But I get

ERROR: failed while looking for manifest and lockfile: failed to update environment: caught a nix exception: running pkgdb subcommand: error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Read-only file system

I’m thinking I can change these permissions as part of the build, but wonder if there’s a better way - if I could find the container definition that creates the ghcr image I could probably adapt that, but am not sure if such a thing is accessible.

Any advice greatly appreciated.

we’re looking into this and will get back to you soon!

Are you getting the error if you run flox as root? This may be the same as Permissions issue running flox inside docker container as user · Issue #1188 · flox/flox · GitHub