Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions docker/cluster/cluster_interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,18 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
#==
# Functions
#==
# Function to display warnings in red
display_warning() {
echo -e "\033[31mWARNING: $1\033[0m"
}

# Helper function to compare version numbers
version_gte() {
# Returns 0 if the first version is greater than or equal to the second, otherwise 1
[ "$(printf '%s\n' "$1" "$2" | sort -V | head -n 1)" == "$2" ]
}

# Function to check docker versions
# If docker version is more than 25, the script errors out.
check_docker_version() {
# check if docker is installed
if ! command -v docker &> /dev/null; then
Expand All @@ -28,12 +38,17 @@ check_docker_version() {
docker_version=$(docker --version | awk '{ print $3 }')
apptainer_version=$(apptainer --version | awk '{ print $3 }')

# Check if version is above 25.xx
if [ "$(echo "${docker_version}" | cut -d '.' -f 1)" -ge 25 ]; then
echo "[ERROR]: Docker version ${docker_version} is not compatible with Apptainer version ${apptainer_version}. Exiting."
exit 1
# Check if Docker version is exactly 24.0.7 or Apptainer version is exactly 1.2.5
if [ "$docker_version" = "24.0.7" ] && [ "$apptainer_version" = "1.2.5" ]; then
echo "[INFO]: Docker version ${docker_version} and Apptainer version ${apptainer_version} are tested and compatible."

# Check if Docker version is >= 27.0.0 and Apptainer version is >= 1.3.4
elif version_gte "$docker_version" "27.0.0" && version_gte "$apptainer_version" "1.3.4"; then
echo "[INFO]: Docker version ${docker_version} and Apptainer version ${apptainer_version} are tested and compatible."

# Else, display a warning for non-tested versions
else
echo "[INFO]: Building singularity with docker version: ${docker_version} and Apptainer version: ${apptainer_version}."
display_warning "Docker version ${docker_version} and Apptainer version ${apptainer_version} are non-tested versions. There could be issues, please try to update them. More info: https://isaac-sim.github.io/IsaacLab/source/deployment/cluster.html"
fi
}

Expand Down Expand Up @@ -139,7 +154,7 @@ case $command in
fi
# Check if Docker image exists
check_image_exists isaac-lab-$profile:latest
# Check if Docker version is greater than 25
# Check docker and apptainer version
check_docker_version
# source env file to get cluster login and path information
source $SCRIPT_DIR/.env.cluster
Expand Down
12 changes: 5 additions & 7 deletions docs/source/deployment/cluster.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@ development machine and the cluster. Such a connection will simplify the file tr
the user cluster password from being requested multiple times.

.. attention::
The workflow has been tested with ``apptainer version 1.2.5-1.el7`` and ``docker version 24.0.7``.
The workflow has been tested with:

- ``apptainer``:
There have been reported binding issues with previous versions (such as ``apptainer version 1.1.3-1.el7``). Please
ensure that you are using the latest version.
- ``Docker``:
The latest versions (``25.x``) cannot be used as they are not compatible yet with apptainer/ singularity.
- ``apptainer version 1.2.5-1.el7`` and ``docker version 24.0.7``
- ``apptainer version 1.3.4`` and ``docker version 27.3.1``

In the case of issues, please try to switch to those versions.

We are waiting for an update from the apptainer team. To track this issue, please check the `forum post`_.

Configuring the cluster parameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading