singularity-hpc icon indicating copy to clipboard operation
singularity-hpc copied to clipboard

fix bug with container add

Open vsoch opened this issue 2 years ago • 7 comments

and expose keep_path to add

vsoch avatar Jul 01 '23 00:07 vsoch

Hi @vsoch , I did some experiments

$shpc add /scratch/pawsey0001/cdipietrantonio/tensorflow.sif amdih:tensorflow:latest
SINGULARITY is not installed, functionality might be limited.
Registry entry amdih was added! Before shpc install, edit:
/software/projects/pawsey0001/cdipietrantonio/setonix/python/lib/python3.9/site-packages/singularity_hpc-0.1.24-py3.9.egg/registry/amdih/container.yaml
$ ls /software/projects/pawsey0001/cdipietrantonio/setonix/python/lib/python3.9/site-packages/singularity_hpc-0.1.24-py3.9.egg/registry/amdih/
container.yaml
$ ls /scratch/pawsey0001/cdipietrantonio/cbase/
amdih  pawsey  sha256:153ff47d5dfac0807504b5c29c7ecd7d9ea6b7736ceb0d5876a1b0c1a980e0c1.sif

So as you can see the container is not copied anymore into the same directory of container.yaml, but directly under container_base, as indeed the code instructs to do.

I was wondering whether it would be better to recreate a directory structure for the container, containing registry and software name. In our case container_base/amdih/tensorflow.

Also, is the path field in container.yaml relative to container_base ?

dipietrantonio avatar Jul 06 '23 06:07 dipietrantonio

Looks like we have some bugs! I’ll take a look tomorrow. Thanks for testing it out!

vsoch avatar Jul 06 '23 06:07 vsoch

hey @dipietrantonio good morning! I just pushed (hopefully) a fix so that the container path includes container_base and the module name (that was a bug) and want to answer your question.

Also, is the path field in container.yaml relative to container_base ?

The container.yaml is part of the registry, so this is derived from a filesystem registry path, e.g., self.settings.filesystem_registry

vsoch avatar Jul 06 '23 13:07 vsoch

There is still a bug - will work on it later today after work!

vsoch avatar Jul 06 '23 14:07 vsoch

Hi @vsoch, how is the work on this PR going?

dipietrantonio avatar Aug 09 '23 06:08 dipietrantonio

I'm trying to remember what the bug is - looking at what I was doing, I was changing container add to have the container go under the container_base. But this is in correct - a container add isn't an install, and should be added alongside the container.yaml config (or not moved at all) since the user isn't actually installing it.

vsoch avatar Aug 09 '23 11:08 vsoch

So I'm tempted to say this is not a bug - a container add should not be installing to the containers base, because it is simply just creating a container.yaml that then should be installed.

vsoch avatar Aug 09 '23 11:08 vsoch