singularityhub / sregistry-cli

Singularity Global Client for container management
https://singularityhub.github.io/sregistry-cli/
Mozilla Public License 2.0
14 stars 18 forks source link

sregistry-cli doesn't honor singularity cache folder #257

Open andersy005 opened 4 years ago

andersy005 commented 4 years ago

First, fantastic work! sregistry-cli has a lot of features I am looking for 😀.

Describe the bug

Per sregistry-cli documentation, sregistry-cli is supposed to honor user's Singularity cache folder. However, this seems not to be the case when using SINGULARITY_CACHEDIR environment variable to override the default $HOME/.singularity.

To Reproduce Steps to reproduce the behavior:

$ echo $SINGULARITY_CACHEDIR # Non default cache dir
/glade/scratch/abanihi/.singularity
$ sregistry pull shub://vsoch/hello-world --force
[client|hub] [database|sqlite:////glade/u/home/abanihi/.singularity/sregistry.db]
Progress |===================================| 100.0%
[container][update] vsoch/hello-world:latest@104932c9ca80c0eb90ebf6a80b7d7400
Success! /glade/u/home/abanihi/.singularity/shub/vsoch/hello-world/latest@104932c9ca80c0eb90ebf6a80b7d7400.sif

Expected behavior A clear and concise description of what you expected to happen.

I expected the pulled image to be cached under /glade/scratch/abanihi/.singularity instead of /glade/u/home/abanihi/.singularity

Version of Singularity and Singularity Registry Client

$ singularity --version
singularity version 3.3.0-1

$ sregistry --version
0.2.35

Anything else?

vsoch commented 4 years ago

The original goal of sregistry was to be a manager for containers, so it pulled into its own organizational space. So I think it’s expected that this cannot conflict with the cache folder. If you just want to use Singularity to manage your images (which now is more reasonable to do) I would recommend just using it for pull.