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
Based on a suggestion from a participant at a recent run of a course based on this material, look at adding the --workdir (or -w) command to the Docker command line to remove the need to use the full /home/singularity path in front of all the files we reference.
At present, when using the Docker Singularity container, we bind mount ${PWD}, the current working directory, into the Docker container at the location /home/singularity. We then want to reference files in that location to read input and write output to a location where the files are still accessible after the Docker Singularity container has exited. This is currently done by prefixing every file with /home/singularity but that lengthens the command line and may be a little confusing to course participants.
As an alternative, if we add -w /home/singularity to the command line, then the working directory within the container is set to this location and it's no longer necessary to prefix references to files in this location with /home/singularity.
The text was updated successfully, but these errors were encountered:
If all the command line examples in the above episodes are edited to remove /home/singularity/ from the front of filenames, this will hide some of the complexity but will it also add some confusion? For example, if we update the alias shown in 06-singularity-images-prep.md to include -w /home/singularity, and then remove /home/singularity from subsequent command line examples, are we simply obscuring some operational details and making it more difficult for learners to understand what's going on when they try to use the material covered here in their own container building processes?
Given that it's useful to highlight the option of using the -w switch, for now, the solution being taken to address this issue is to add a note box into 06-singularity-images-prep.md to highlight the option of using -w or --workdir.
Based on a suggestion from a participant at a recent run of a course based on this material, look at adding the
--workdir
(or-w
) command to the Docker command line to remove the need to use the full/home/singularity
path in front of all the files we reference.At present, when using the Docker Singularity container, we bind mount
${PWD}
, the current working directory, into the Docker container at the location/home/singularity
. We then want to reference files in that location to read input and write output to a location where the files are still accessible after the Docker Singularity container has exited. This is currently done by prefixing every file with/home/singularity
but that lengthens the command line and may be a little confusing to course participants.As an alternative, if we add
-w /home/singularity
to the command line, then the working directory within the container is set to this location and it's no longer necessary to prefix references to files in this location with/home/singularity
.The text was updated successfully, but these errors were encountered: