Closed nick-youngblut closed 5 months ago
This is a fundamental difference between docker and apptainer, a different approach which many people like. I don't think that will be changing. If you need the capability of searching multiple directories, you can add it in a wrapper script.
You can also just type the name of a container file and the shell should search through the PATH and run it with apptainer. See https://apptainer.org/docs/user/latest/quick_start.html#running-a-container.
@DrDaveD where do the docs state that apptainer will search the user's PATH for sif files?
I tried this approach, but it didn't work. All of the sif files are in ${HOME}/apptainers/
, and I added ${HOME}/apptainers/
to my PATH, but apptainer couldn't find the sif files.
It doesn't explicitly say it will search the PATH but it says you can run it as any other executable. Just type the full name of your container as a command (without the ./
like it shows in the example).
Which Document page:
Quck Start
Expected results:
I'm used to Docker, where there are no
sif
files to specify. One can just rundocker run <name_of_image>
. AFAIK,apptainer run
requires the user to specify the path to thesif
file.All of the apptainer docs seem to assume that the
sif
file is in the user's working directory (e.g.,apptainer run lolcow_latest.sif
). There doesn't seem to be any clear docs on whether/how one can set a PATH-like variable that defines whereapptainer run
will look for sif files, if thesif
file is not in the user's working directory. For example:If this is not possible, it would help to explicitly state that one must always provide the path to the
sif
file... or create some sort of custom alias/function to set the directory where allsif
files are located (if the specifiedsif
file path does not exist).Actual results:
It would be helpful if the user could organize all
sif
files in >=1 specific locations (repositories) and easily call any one of thesesif
files without the need to provide the full to thesif
file or create a custom setup (e.g., an alias or function).