Commit e9de688e authored by Alexander Poddubny's avatar Alexander Poddubny Committed by Kelly Guo

Supports Isaac Lab image based on different Isaac Sim images (#173)

This change will allow generation of multiple Isaac Lab images based on
different versions of Isaac Sim images. Previously, only a single image
can be created.
parent 1a2d7048
...@@ -28,13 +28,17 @@ phases: ...@@ -28,13 +28,17 @@ phases:
REPO_SHORT_NAME="verification" REPO_SHORT_NAME="verification"
fi fi
# Parse the env variable string into an array
mapfile -d ' ' -t IMAGE_BASE_VERSIONS <<< "$ISAACSIM_BASE_VERSIONS_STRING"
for IMAGE_BASE_VERSION in "${IMAGE_BASE_VERSIONS[@]}"; do
IMAGE_BASE_VERSION=$(echo "$IMAGE_BASE_VERSION" | tr -d '[:space:]')
# Combine repo short name and branch name for the tag # Combine repo short name and branch name for the tag
COMBINED_TAG="${REPO_SHORT_NAME}-${SAFE_BRANCH_NAME}" COMBINED_TAG="${REPO_SHORT_NAME}-${SAFE_BRANCH_NAME}-${IMAGE_BASE_VERSION}"
docker login -u \$oauthtoken -p $NGC_TOKEN nvcr.io docker login -u \$oauthtoken -p $NGC_TOKEN nvcr.io
docker build -t $IMAGE_NAME:$COMBINED_TAG \ docker build -t $IMAGE_NAME:$COMBINED_TAG \
--build-arg ISAACSIM_BASE_IMAGE_ARG=$ISAACSIM_BASE_IMAGE \ --build-arg ISAACSIM_BASE_IMAGE_ARG=$ISAACSIM_BASE_IMAGE \
--build-arg ISAACSIM_VERSION_ARG=$ISAACSIM_BASE_VERSION \ --build-arg ISAACSIM_VERSION_ARG=$IMAGE_BASE_VERSION \
--build-arg ISAACSIM_ROOT_PATH_ARG=/isaac-sim \ --build-arg ISAACSIM_ROOT_PATH_ARG=/isaac-sim \
--build-arg ISAACLAB_PATH_ARG=/workspace/isaaclab \ --build-arg ISAACLAB_PATH_ARG=/workspace/isaaclab \
--build-arg DOCKER_USER_HOME_ARG=/root \ --build-arg DOCKER_USER_HOME_ARG=/root \
...@@ -42,3 +46,4 @@ phases: ...@@ -42,3 +46,4 @@ phases:
docker push $IMAGE_NAME:$COMBINED_TAG docker push $IMAGE_NAME:$COMBINED_TAG
docker tag $IMAGE_NAME:$COMBINED_TAG $IMAGE_NAME:$COMBINED_TAG-b$CODEBUILD_BUILD_NUMBER docker tag $IMAGE_NAME:$COMBINED_TAG $IMAGE_NAME:$COMBINED_TAG-b$CODEBUILD_BUILD_NUMBER
docker push $IMAGE_NAME:$COMBINED_TAG-b$CODEBUILD_BUILD_NUMBER docker push $IMAGE_NAME:$COMBINED_TAG-b$CODEBUILD_BUILD_NUMBER
done
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