broadinstitute / PhylogicNDT

Other
70 stars 39 forks source link

specifying output folder for singularity #49

Open SebastianHollizeck opened 4 years ago

SebastianHollizeck commented 4 years ago

Hi,

i would love to use this through singularity in our HPC, but the issue is, that the program writes to the location of the python script, which errors out on the read-only filesystem singularity is based on.

I created a workaround with sandbox mode in singularity, but it would be amazing, if there was an option to specify the output location for the tool. So it can be more widely used.

Cheers, Sebastian

AAlhendi1707 commented 2 years ago

Same issue here

pmitev commented 2 years ago

I have changed line 17 in my container
from filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'phylogicndt.log') to filename = os.path.join(os.getcwd(), 'phylogicndt.log')

which writes the logfile in the current directory instead... I am not sure if this is the only place where the code will write in the installation folder, though...

bio937 commented 2 years ago

@SebastianHollizeck @AAlhendi1707 @pmitev

I encountered the same issue while trying to run PhylogicNDT inside a singularity container.

After changing that one line of code suggested by @pmitev, now it works when using the --help argument. Previously, it will show: IOError: [Errno 30] Read-only file system: Thank you so much! @pmitev

I first created singularity sandbox and changed that line of code, then converted the sandbox to Singularity Image Format (.sif)