-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.test.yaml
More file actions
135 lines (122 loc) · 4.8 KB
/
docker-compose.test.yaml
File metadata and controls
135 lines (122 loc) · 4.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# Test docker-compose override for running Isaac Teleop tests with CloudXR.
# Used together with docker-compose.runtime.yaml.
#
# Note: Run with a different project name to isolate volumes from dev environment:
# docker compose -p isaacteleop-test -f docker-compose.runtime.yaml -f docker-compose.test.yaml up
#
# This creates volumes like "isaacteleop-test_openxr-volume" instead of "cloudxr_openxr-volume"
#
# NOTE: Must be used with -f docker-compose.runtime.yaml -f docker-compose.test.yaml
# (Docker Compose's include: directive doesn't allow service overrides)
services:
# Override cloudxr-runtime for CI: accept EULA, use runc + deploy block for
# hook-based GPU injection (the base file's runtime: nvidia is unavailable on
# CI runners where the nvidia runtime is not registered).
cloudxr-runtime:
runtime: runc
environment:
- ACCEPT_EULA=Y
- NV_DEVICE_PROFILE=Quest3
- VK_LOADER_DEBUG=all
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [ gpu ]
# Test runner container
# Build handled via docker compose using this service's build definition.
isaacteleop-tests:
build:
context: ${CXR_BUILD_CONTEXT:?CXR_BUILD_CONTEXT must point to repository root}
dockerfile: deps/cloudxr/Dockerfile.test
args:
PYTHON_VERSION:
image: isaacteleop-tests:latest
pull_policy: never
network_mode: host
depends_on:
cloudxr-runtime:
condition: service_healthy
environment:
- NV_CXR_RUNTIME_DIR=/cloudxr-test/.cloudxr/run
- XR_RUNTIME_JSON=/cloudxr-test/.cloudxr/openxr_cloudxr.json
- CXR_PYTHON_GPU_TESTS
- CXR_NATIVE_GPU_TESTS
- EXPECTED_ISAACTELEOP_VERSION
volumes:
- openxr-volume:/cloudxr-test/:ro
working_dir: /app/tests
entrypoint: ["/bin/bash", "-c"]
command:
- |
set -e
echo "=========================================="
echo "Isaac Teleop Test Runner"
echo "=========================================="
echo ""
echo "XR_RUNTIME_JSON: $${XR_RUNTIME_JSON}"
echo "CXR_PYTHON_GPU_TESTS: $${CXR_PYTHON_GPU_TESTS}"
echo "CXR_NATIVE_GPU_TESTS: $${CXR_NATIVE_GPU_TESTS}"
echo ""
PASSED=0
FAILED=0
FAILED_TESTS=""
# Run Python tests
if [ -n "$${CXR_PYTHON_GPU_TESTS}" ]; then
echo "=========================================="
echo "Running Python Tests"
echo "=========================================="
IFS=',' read -ra TESTS <<< "$${CXR_PYTHON_GPU_TESTS}"
for test_script in "$${TESTS[@]}"; do
test_script=$$(echo "$$test_script" | xargs) # trim whitespace
echo "----------------------------------------"
echo "Running: $$test_script"
echo "----------------------------------------"
if python "$$test_script"; then
echo "✅ PASSED: $$test_script"
PASSED=$((PASSED + 1))
else
echo "❌ FAILED: $$test_script"
FAILED=$((FAILED + 1))
FAILED_TESTS="$$FAILED_TESTS $$test_script"
fi
echo ""
done
fi
# Run native C++ tests
if [ -n "$${CXR_NATIVE_GPU_TESTS}" ]; then
echo "=========================================="
echo "Running Native C++ Tests"
echo "=========================================="
IFS=',' read -ra NATIVES <<< "$${CXR_NATIVE_GPU_TESTS}"
for native_test in "$${NATIVES[@]}"; do
native_test=$$(echo "$$native_test" | xargs) # trim whitespace
echo "----------------------------------------"
echo "Running: $$native_test"
echo "----------------------------------------"
if /app/$$native_test; then
echo "✅ PASSED: $$native_test"
PASSED=$((PASSED + 1))
else
echo "❌ FAILED: $$native_test"
FAILED=$((FAILED + 1))
FAILED_TESTS="$$FAILED_TESTS $$native_test"
fi
echo ""
done
fi
echo "=========================================="
echo "Test Results Summary"
echo "=========================================="
echo "Passed: $$PASSED"
echo "Failed: $$FAILED"
if [ $$FAILED -gt 0 ]; then
echo "Failed tests:$$FAILED_TESTS"
exit 1
fi
echo "✅ All tests passed!"
exit 0