You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry I couldn't chime in during #679, I got sick. I'm now trying to test the feature but can't make it work.
The problem I'm facing is that <module_base>/<container_path>/<version> is meant to be a directory under which shpc creates the bin directory with all the wrapper scripts.
With version_naming set to true, shpc now also assumes with path to be a file to write the content of the TCL module, hence a clash. cc @Amjadhpc
To Reproduce
With the default settings (version_naming set to false):
$ rm -r modules
$ shpc config get version_naming
False
$ shpc install python:3.9.2-alpine
Module python:3.9.2-alpine was created.
With the option turned on
$ shpc config set version_naming True
Updated version_naming to be True
$ shpc config get version_naming
True
$ rm -r modules
$ shpc install python:3.9.2-alpine
Traceback (most recent call last):
File "/software/treeoflife/conda/users/envs/team328/mm49/shpc/bin/shpc", line 8, in <module>
sys.exit(run_shpc())
^^^^^^^^^^
File "/nfs/users/nfs_m/mm49/workspace/tol-it/central_software/singularity-hpc/shpc/client/__init__.py", line 556, in run_shpc
main(args=args, parser=parser, extra=extra, subparser=helper)
File "/nfs/users/nfs_m/mm49/workspace/tol-it/central_software/singularity-hpc/shpc/client/install.py", line 27, in main
cli.install(
File "/nfs/users/nfs_m/mm49/workspace/tol-it/central_software/singularity-hpc/shpc/main/modules/base.py", line 485, in install
self.container.install(module_path, template, module, kwargs.get("features"))
File "/nfs/users/nfs_m/mm49/workspace/tol-it/central_software/singularity-hpc/shpc/main/container/singularity.py", line 233, in install
utils.write_file(module_path, out)
File "/nfs/users/nfs_m/mm49/workspace/tol-it/central_software/singularity-hpc/shpc/utils/fileio.py", line 176, in write_file
with open(filename, mode) as filey:
^^^^^^^^^^^^^^^^^^^^
IsADirectoryError: [Errno 21] Is a directory: '/nfs/users/nfs_m/mm49/workspace/tol-it/central_software/singularity-hpc/modules/python/3.9.2-alpine'
Expected behavior
I believe shpc install python:3.9.2-alpine should succeed out of the box, especially as I didn't see any indication the new option could only be used in certain conditions.
@muffato , correct me if i am wrong, you are just deleting the modules file with
rm -r modules ?
Can you please use shpc uninstall instead of rm ?
shpc uninstall python:3.9.2-alpine
python:3.9.2-alpine? (yes/no)? yes
$container_base/python:3.9.2-alpine and all subdirectories have been removed.
$module_base/python:3.9.2-alpine and all subdirectories have been removed.
$wrapper_base/python:3.9.2-alpine and all subdirectories have been removed.
singularity-hpc]# shpc config set version_naming True
Updated version_naming to be True
singularity-hpc]# shpc install python:3.9.2-alpine
singularity-hpc]#Module python:3.9.2-alpine was created.
Same error when doing shpc uninstall because all the files involved were in modules/ and shpc uninstall merely does a rm -r under the hood. But that made me understand the difference and the problem better !
In default settings, module_base == wrapper_base == $root_dir/modules. That's essentially what's causing my bug.
If I set wrapper_base to a different location, then the wrapper script directory doesn't clash anymore with the module directory. In other words, version_naming requires wrapper_base to be set to a different path from module_base.
Describe the bug
Sorry I couldn't chime in during #679, I got sick. I'm now trying to test the feature but can't make it work.
The problem I'm facing is that
<module_base>/<container_path>/<version>
is meant to be a directory under which shpc creates thebin
directory with all the wrapper scripts.With
version_naming
set to true, shpc now also assumes with path to be a file to write the content of the TCL module, hence a clash. cc @AmjadhpcTo Reproduce
With the default settings (
version_naming
set to false):With the option turned on
Expected behavior
I believe
shpc install python:3.9.2-alpine
should succeed out of the box, especially as I didn't see any indication the new option could only be used in certain conditions.Also, I wonder how it works in the test case: https://github.com/singularityhub/singularity-hpc/pull/679/files#diff-9ef112d1d82a448d99f2cf48d7718defdde5618f6657ab2a99e6f6f5d7941729 . Am I doing anything different ?
Version of Singularity and Singularity Registry HPC Client
The text was updated successfully, but these errors were encountered: