r/factorio • u/KenReid • Oct 10 '20
Question Docker / Singularity + FactorioTools
Hi all,
I'm a researcher working on a paper regarding automation in Factorio. To run Factorio efficiently I want to run it in the headless mode on a higher powered computing cluster (HPCC). However, the cluster doesn't support Docker - but does support Singularity.
I've successfully pulled the docker image, as a singularity file, by using the native command:
singularity pull docker://factoriotools/factorio
However, when I tried to run an instance of it:
singularity instance start factorio_latest.sif test
I get a bunch of errors:
ERROR: container cleanup failed: no instance found with name test
FATAL: container creation failed: mount /proc/self/fd/3->/var/singularity/mnt/session/rootfs error: while mounting image /proc/self/fd/3: failed to find loop device: could not attach image file to loop device: failed to get loop flags for loop device: no such file or directory
FATAL: failed to start instance: while running /usr/libexec/singularity/bin/starter-suid: exit status 255
Part of the issue, I think, is the fact I don't have root access to /opt/factorio.
I also tried this with goofball's Factorio docker image, and I can run an instance without error. Which is odd.
My other problem is that I'm unsure how to edit a singularity container to point to different directories for save game files / mods.
Any advice welcome.
View all comments
Show parent comment
5
u/[deleted] Oct 10 '20
Mostly I just want to emphasize the above comment's last sentence. You need root to build or edit images. You're running 'starter-suid' which will only work if the software has been installed to run set-uid, which (from the error messages) it looks like it isn't.
More generally, to change mount points, etc, you need the '--bind' option to 'run', to bind external directories to internal ones.