TACC / rgc

RollingGantryCrane pulls and converts containers to LMOD modules
https://tacc.github.io/rgc/
BSD 3-Clause "New" or "Revised" License
12 stars 3 forks source link

Issue with creating Modulefiles with customized container locations #25

Open snowbird294 opened 3 years ago

snowbird294 commented 3 years ago

Example Command:

rgc -M /apps/modulefiles/containers -I /apps/singularity-3/containers -S biocontainers/bwa:0.7.15

Resulting Modulefile line:

set_shell_function("bwa",'singularity exec /home/jhrogers/apps/singularity-3/containers/bwa/bwa-0.7.15.sif bwa $@','singularity exec /home/jhrogers/apps/singularity-3/containers/bwa/bwa-0.7.15.sif bwa $*')

Expected Line:

set_shell_function("bwa",'singularity exec /apps/singularity-3/containers/bwa/bwa-0.7.15.sif bwa $@','singularity exec /apps/singularity-3/containers/bwa/bwa-0.7.15.sif bwa $*')

Further Information:

If I use the --prefix without the --imagedir, the modulefile comes out mostly correct, but the needed image isn't stored.

Example: rgc -M /apps/modulefiles/containers -P /apps/singularity-3 -S biocontainers/bwa:0.7.15

Results: Modulefile: set_shell_function("bwa",'singularity exec /apps/singularity-3/containers/bwa/bwa-0.7.15.sif bwa $@','singularity exec /apps/singularity-3/containers/bwa/bwa-0.7.15.sif bwa $*') note: it adds "containers" to the path, which is strange.

ls -l /apps/singularity-3/containers total 0

Expected Results: ls -l /apps/singularity-3/containers/ total 0 drwxr-x--- 2 jhrogers admin 36 Aug 11 16:25 bwa

zyndagj commented 3 years ago

Hello, thanks for reporting this issue, along with the steps to reproduce it! I'll keep you updated as I make progress on correcting these path issues.

snowbird294 commented 3 years ago

Further Information, it works as I expect if I change my directory to /

Example:

cd / rgc -M /apps/modulefiles/containers -P /apps/singularity-3 -S biocontainers/bwa:0.7.15

Resulting Modulefileline: set_shell_function("bwa",'singularity exec /apps/singularity-3/containers/bwa/bwa-0.7.15.sif bwa $@','singularity exec /apps/singularity-3/containers/bwa/bwa-0.7.15.sif bwa $*')

Makes me think it's pulling in the current working directory with --imagedir, which it might not need to do.

Thanks much for making this, saving me days worth of effort.