Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Keep Docker build contexts lean for CloudXR compose builds.
# Ignore everything by default, then allow only what current Dockerfiles need.

*

# Allow Docker metadata files.
!.dockerignore

# Allow CloudXR Dockerfiles and runtime assets.
!deps/cloudxr/

# Allow build artifacts and tests consumed by Dockerfile.test and Dockerfile.runtime.
!install/
!examples/

# Allow src for ros2 workflows
!src/
8 changes: 3 additions & 5 deletions deps/cloudxr/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ WORKDIR /app
# Install uv for fast Python package management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv

# Copy the install directory (contains wheels, libs, native test binaries, etc.)
COPY install/ /app/install/

# Copy test files
COPY examples/oxr/python/ /app/tests/

# Copy the install directory (contains wheels, libs, native test binaries, etc.)
COPY install/ /app/install/

# Install Python dependencies using uv
WORKDIR /app/tests
RUN uv venv --python $PYTHON_VERSION /app/venv && \
Expand All @@ -39,7 +39,5 @@ ENV PATH="/app/venv/bin:$PATH"
ENV PYTHONPATH="/app/install/lib:$PYTHONPATH"
ENV XR_RUNTIME_JSON="/openxr/openxr_cloudxr.json"

WORKDIR /app/tests

# Default command runs the test script
CMD ["python", "test_extensions.py"]
7 changes: 6 additions & 1 deletion deps/cloudxr/docker-compose.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ services:
capabilities: [ gpu ]

# Test runner container
# Build with: docker build -t isaacteleop-tests:latest -f deps/cloudxr/Dockerfile.test .
# 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
Expand Down
26 changes: 14 additions & 12 deletions scripts/run_tests_with_cloudxr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,22 +248,24 @@ fi
export EXPECTED_ISAACTELEOP_VERSION
log_info "Expected isaacteleop version from wheel artifact: $EXPECTED_ISAACTELEOP_VERSION"

# Build test container
log_info "Building test container..."
# Build CloudXR runtime + test services via compose
log_info "Building CloudXR runtime and test containers..."

BUILD_ARGS="-q"
COMPOSE_BUILD_ARGS=()
if [ "$FORCE_BUILD" = true ]; then
BUILD_ARGS="$BUILD_ARGS --no-cache"
COMPOSE_BUILD_ARGS+=(--no-cache)
fi

docker build \
$BUILD_ARGS \
--build-arg PYTHON_VERSION="$PYTHON_VERSION" \
-t isaacteleop-tests:latest \
-f deps/cloudxr/Dockerfile.test \
.
docker compose \
-p "$COMPOSE_PROJECT" \
--env-file "$ENV_DEFAULT" \
${ENV_LOCAL:+--env-file "$ENV_LOCAL"} \
${ENV_TEST:+--env-file "$ENV_TEST"} \
-f "$COMPOSE_RUNTIME" \
-f "$COMPOSE_TEST" \
build "${COMPOSE_BUILD_ARGS[@]}" cloudxr-runtime isaacteleop-tests

log_success "Test container built successfully"
log_success "CloudXR runtime and test containers built successfully"

# Start CloudXR runtime services
log_info "Starting CloudXR runtime services..."
Expand All @@ -275,7 +277,7 @@ docker compose \
${ENV_TEST:+--env-file "$ENV_TEST"} \
-f "$COMPOSE_RUNTIME" \
-f "$COMPOSE_TEST" \
up --build -d cloudxr-runtime
up -d cloudxr-runtime

# Wait for CloudXR runtime to be healthy
log_info "Waiting for CloudXR runtime to be healthy..."
Expand Down
Loading