Apptainer: Difference between revisions

Jump to navigation Jump to search
Marked this version for translation
(Bind-mount /home using an alternate destination directory)
(Marked this version for translation)
Line 311: Line 311:
i.e., <code>-B ./my_data_file.txt:/special/input.dat</code> bind mount maps the file <code>./my_data_file.txt</code> to be the file <code>/special/input.dat</code> inside the container and the <code>wc</code> command now processes that file. This feature can be useful when programs/scripts inside the container have hard-coded paths to files and directories that must be located in certain locations.
i.e., <code>-B ./my_data_file.txt:/special/input.dat</code> bind mount maps the file <code>./my_data_file.txt</code> to be the file <code>/special/input.dat</code> inside the container and the <code>wc</code> command now processes that file. This feature can be useful when programs/scripts inside the container have hard-coded paths to files and directories that must be located in certain locations.


<!--T:141-->
If you need to bind-mount the <code>/home</code> filesystem in your container, use an alternate destination directory:
If you need to bind-mount the <code>/home</code> filesystem in your container, use an alternate destination directory:


<!--T:142-->
* <code>-B /home:/cluster_home</code>
* <code>-B /home:/cluster_home</code>


<!--T:143-->
This ensures that configuration files and programs in your home directory do not interfere with the software in your container. For example, programs in <code>$HOME/bin</code> and Python packages in <code>$HOME/.local/lib/python3.x</code> could be used instead of the corresponding files in your container in you used <code>-B /home</code>.
This ensures that configuration files and programs in your home directory do not interfere with the software in your container. For example, programs in <code>$HOME/bin</code> and Python packages in <code>$HOME/.local/lib/python3.x</code> could be used instead of the corresponding files in your container in you used <code>-B /home</code>.


rsnt_translations
56,420

edits

Navigation menu