Unverified Commit 3ab2acef authored by Pascal Roth's avatar Pascal Roth Committed by GitHub

Removes root requirement to build singularity image for cluster deployment (#484)

# Description

Remove the root requirement to build a singularity image for the cluster
workflow by using the `--fakeroot` flag. Also added a note that this
flag can be removed in the case of issues.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have run all the tests with `./orbit.sh --test` and they pass
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent ae222ba1
......@@ -176,11 +176,13 @@ case $mode in
# source env file to get cluster login and path information
source $SCRIPT_DIR/.env.base
# clear old exports
sudo rm -r -f /$SCRIPT_DIR/exports
rm -rf /$SCRIPT_DIR/exports
mkdir -p /$SCRIPT_DIR/exports
# create singularity image
# NOTE: we create the singularity image as non-root user to allow for more flexibility. If this causes
# issues, remove the --fakeroot flag and open an issue on the orbit repository.
cd /$SCRIPT_DIR/exports
APPTAINER_NOHTTPS=1 apptainer build --sandbox orbit.sif docker-daemon://orbit:latest
APPTAINER_NOHTTPS=1 apptainer build --sandbox --fakeroot orbit.sif docker-daemon://orbit:latest
# tar image and send to cluster
tar -cvf /$SCRIPT_DIR/exports/orbit.tar orbit.sif
scp /$SCRIPT_DIR/exports/orbit.tar $CLUSTER_LOGIN:$CLUSTER_SIF_PATH/orbit.tar
......
......@@ -57,7 +57,7 @@ the user cluster password from being requested multiple times.
Configuring the cluster parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First, you need to configure the cluster-specific parameters in ``docker/.env`` file.
First, you need to configure the cluster-specific parameters in ``docker/.env.base`` file.
The following describes the parameters that need to be configured:
- ``CLUSTER_ISAAC_SIM_CACHE_DIR``:
......@@ -97,6 +97,11 @@ This command will create a singularity image under ``docker/exports`` directory
upload it to the defined location on the cluster. Be aware that creating the singularity
image can take a while.
.. note::
By default, the singularity image is created without root access by providing the ``--fakeroot`` flag to
the ``apptainer build`` command. In case the image creation fails, you can try to create it with root
access by removing the flag in ``docker/container.sh``.
Job Submission and Execution
----------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment