Skip to content

Commit fca912b

Browse files
authored
Merge pull request #157 from gkaf89/feature/containers
[containers] Add information about default bind mounts
2 parents 5e80cdc + b5135b9 commit fca912b

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

docs/environment/containers.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,27 @@ apptainer exec ubuntu_latest.sif cat /etc/os-release
6666
LOGO=ubuntu-logo
6767
```
6868

69+
!!! warning "Errors and warning in container run executables"
70+
If you encounter any errors or warnings of the form
71+
```
72+
-bash: <command>: command not found
73+
```
74+
when you execute a command (`exec`) or start an interactive shell (`shell`) in a container, then disable the default binding of the home directory with the option `--no-mount home`. The full command is the following.
75+
```
76+
apptainer (exec|shell|run) --no-mount home <path/to/container_file>.sif [...]
77+
```
78+
79+
Apptainer binds a default set of directories in the container it runs, including the user `${HOME}` directory. Users may define set up components of their environment in scripts stored in their home directory, like `.bashrc` and Python user package installations. When the home directory is bound in the container, then the home environment configuration of the user can override the container environment.
80+
81+
??? info "System-defined default bind paths"
82+
The Apptainer is configured to mount a set directories automatically. The complete list is found in the [documentation](https://apptainer.org/docs/user/main/bind_paths_and_mounts.html#disabling-system-binds) and the directories mount automatically in our systems are listing in the `mount` options of the configuration file `${EBROOTAPPTAINER}/etc/apptainer/apptainer.conf`. All `mount` option in the configuration file, for instance
83+
```
84+
mount home = yes
85+
```
86+
can be disabled with the `--no-mount` command option.
87+
88+
There are some more files bound with `bind` options in the configuration file. These files are required for network connection and other services.
89+
6990
### Building container images
7091

7192
Building container images requires root privileges. Therefore, users have to build images on their local machine before transferring them to the UL HPC platform. Please refer to the [Data transfer](../data/transfer.md) section for this purpose.

0 commit comments

Comments
 (0)