Unverified Commit 77e74133 authored by David Hoeller's avatar David Hoeller Committed by GitHub

Updates the CI runner to "latest:1.2" (#1016)

# Description

Updates the CI runner and adds an app warm starting phase before running all the tests.

## 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
`./isaaclab.sh --format`
- [ ] 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 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 e00d6256
......@@ -5,8 +5,8 @@ phases:
commands:
- echo "Building a docker image"
- docker login -u \$oauthtoken -p $NGC_TOKEN nvcr.io
- docker build -t $IMAGE_NAME:latest-1.1 --build-arg ISAACSIM_VERSION_ARG=4.2.0 --build-arg ISAACSIM_ROOT_PATH_ARG=/isaac-sim --build-arg ISAACLAB_PATH_ARG=/workspace/isaaclab --build-arg DOCKER_USER_HOME_ARG=/root -f docker/Dockerfile.base .
- docker build -t $IMAGE_NAME:latest-1.2 --build-arg ISAACSIM_VERSION_ARG=4.2.0 --build-arg ISAACSIM_ROOT_PATH_ARG=/isaac-sim --build-arg ISAACLAB_PATH_ARG=/workspace/isaaclab --build-arg DOCKER_USER_HOME_ARG=/root -f docker/Dockerfile.base .
- echo "Pushing the docker image"
- docker push $IMAGE_NAME:latest-1.1
- docker tag $IMAGE_NAME:latest-1.1 $IMAGE_NAME:latest-1.1-b$CODEBUILD_BUILD_NUMBER
- docker push $IMAGE_NAME:latest-1.1-b$CODEBUILD_BUILD_NUMBER
- docker push $IMAGE_NAME:latest-1.2
- docker tag $IMAGE_NAME:latest-1.2 $IMAGE_NAME:latest-1.2-b$CODEBUILD_BUILD_NUMBER
- docker push $IMAGE_NAME:latest-1.2-b$CODEBUILD_BUILD_NUMBER
......@@ -4,7 +4,7 @@ phases:
pre_build:
commands:
- echo "Launching EC2 instance to run tests"
- INSTANCE_ID=$(aws ec2 run-instances --image-id ami-064d9f428f75cebb1 --count 1 --instance-type g5.2xlarge --key-name production/ssh/isaaclab --security-group-ids sg-02617e4b8916794c4 --subnet-id subnet-0907ceaeb40fd9eac --block-device-mappings 'DeviceName=/dev/sda1,Ebs={VolumeSize=500}' --output text --query 'Instances[0].InstanceId')
- INSTANCE_ID=$(aws ec2 run-instances --image-id ami-0f7f7fb14ee15d5ae --count 1 --instance-type g5.2xlarge --key-name production/ssh/isaaclab --security-group-ids sg-02617e4b8916794c4 --subnet-id subnet-0907ceaeb40fd9eac --block-device-mappings 'DeviceName=/dev/sda1,Ebs={VolumeSize=500}' --output text --query 'Instances[0].InstanceId')
- aws ec2 wait instance-running --instance-ids $INSTANCE_ID
- EC2_INSTANCE_IP=$(aws ec2 describe-instances --filters "Name=instance-state-name,Values=running" "Name=instance-id,Values=$INSTANCE_ID" --query 'Reservations[*].Instances[*].[PrivateIpAddress]' --output text)
- mkdir -p ~/.ssh
......
......@@ -307,9 +307,54 @@ def test_all(
return num_failing + num_timing_out == 0
def warm_start_app():
"""Warm start the app to compile shaders before running the tests."""
print("[INFO] Warm starting the simulation app before running tests.")
before = time.time()
# headless experience
warm_start_output = subprocess.run(
[
sys.executable,
"-c",
(
"from omni.isaac.lab.app import AppLauncher; app_launcher = AppLauncher(headless=True);"
" app_launcher.app.close()"
),
],
capture_output=True,
)
if len(warm_start_output.stderr) > 0:
logging.error(f"Error warm starting the app: {str(warm_start_output.stderr)}")
exit(1)
# headless experience with rendering
warm_start_rendering_output = subprocess.run(
[
sys.executable,
"-c",
(
"from omni.isaac.lab.app import AppLauncher; app_launcher = AppLauncher(headless=True,"
" enable_cameras=True); app_launcher.app.close()"
),
],
capture_output=True,
)
if len(warm_start_rendering_output.stderr) > 0:
logging.error(f"Error warm starting the app with rendering: {str(warm_start_rendering_output.stderr)}")
exit(1)
after = time.time()
time_elapsed = after - before
print(f"[INFO] Warm start completed successfully in {time_elapsed:.2f} s")
if __name__ == "__main__":
# parse command line arguments
args = parse_args()
# warm start the app
warm_start_app()
# add tests to skip to the list of tests to skip
tests_to_skip = TESTS_TO_SKIP
tests_to_skip += args.skip_tests
......
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