Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ilab wrapper: add support for additional mounts
# Background We have an ilab wrapper script that users will use to launch the ilab container. Users may want to mount additional volumes into the container, as they could possibly have e.g. large models stored in some external storage. # Problem Users cannot simply edit the script to add the mounts to the podman command as it is read-only. # Solution Add support for an environment variable that users can set to specify additional mounts to be added to the podman command. This will allow users to specify additional mounts without having to modify the script. # Implementation The script will now check for the `ILAB_ADDITIONAL_MOUNTS` environment variable. If it is set, the script will parse the variable as evaluated bash code to get the mounts. The mounts will then be added to the podman command. Example `ILAB_ADDITIONAL_MOUNTS` usage: ```bash ILAB_ADDITIONAL_MOUNTS="/host/path:/container/path /host/path2:/container/path2"` ``` If your path contains spaces, you can use quotes: ```bash ILAB_ADDITIONAL_MOUNTS="/host/path:/container/path '/host/path with spaces':/container/path" ``` The latter works because the script uses `eval` to parse the mounts. Signed-off-by: Omer Tuchfeld <[email protected]>
- Loading branch information