Skip to content

Commit 51a5e7c

Browse files
authored
Removes root requirement to build singularity image for cluster deployment (isaac-sim#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
1 parent 935d8d0 commit 51a5e7c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

docker/container.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,13 @@ case $mode in
176176
# source env file to get cluster login and path information
177177
source $SCRIPT_DIR/.env.base
178178
# clear old exports
179-
sudo rm -r -f /$SCRIPT_DIR/exports
179+
rm -rf /$SCRIPT_DIR/exports
180180
mkdir -p /$SCRIPT_DIR/exports
181181
# create singularity image
182+
# NOTE: we create the singularity image as non-root user to allow for more flexibility. If this causes
183+
# issues, remove the --fakeroot flag and open an issue on the orbit repository.
182184
cd /$SCRIPT_DIR/exports
183-
APPTAINER_NOHTTPS=1 apptainer build --sandbox orbit.sif docker-daemon://orbit:latest
185+
APPTAINER_NOHTTPS=1 apptainer build --sandbox --fakeroot orbit.sif docker-daemon://orbit:latest
184186
# tar image and send to cluster
185187
tar -cvf /$SCRIPT_DIR/exports/orbit.tar orbit.sif
186188
scp /$SCRIPT_DIR/exports/orbit.tar $CLUSTER_LOGIN:$CLUSTER_SIF_PATH/orbit.tar

docs/source/deployment/cluster.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ the user cluster password from being requested multiple times.
5757
Configuring the cluster parameters
5858
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5959

60-
First, you need to configure the cluster-specific parameters in ``docker/.env`` file.
60+
First, you need to configure the cluster-specific parameters in ``docker/.env.base`` file.
6161
The following describes the parameters that need to be configured:
6262

6363
- ``CLUSTER_ISAAC_SIM_CACHE_DIR``:
@@ -97,6 +97,11 @@ This command will create a singularity image under ``docker/exports`` directory
9797
upload it to the defined location on the cluster. Be aware that creating the singularity
9898
image can take a while.
9999

100+
.. note::
101+
By default, the singularity image is created without root access by providing the ``--fakeroot`` flag to
102+
the ``apptainer build`` command. In case the image creation fails, you can try to create it with root
103+
access by removing the flag in ``docker/container.sh``.
104+
100105

101106
Job Submission and Execution
102107
----------------------------

0 commit comments

Comments
 (0)