Skip to content
Draft
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
cc5d1b4
Unify test and runtime container builds under compose
aristarkhovNV Mar 19, 2026
d4d4fff
Add .dockerignore for faster incremental container builds
aristarkhovNV Mar 19, 2026
0522c03
Reorder COPY commands in Dockerfile.test for better caching
aristarkhovNV Mar 19, 2026
9c88ae9
Remove redundant WORKDIR command in Dockerfile.test
aristarkhovNV Mar 19, 2026
d2e4a5b
remove redundant lines from .dockerignore
aristarkhovNV Mar 19, 2026
5e3b764
Add src directory to .dockerignore for ros2 workflows
aristarkhovNV Mar 20, 2026
117451f
Allow .git directory in .dockerignore to compute isaacteleop package …
aristarkhovNV Mar 30, 2026
fbbb7fa
Update .dockerignore to allow source builds
aristarkhovNV Mar 30, 2026
ea69e7a
Remove clang-format installation from Dockerfile
aristarkhovNV Mar 30, 2026
358a422
remove git dependency from local version calculation
aristarkhovNV Mar 30, 2026
d3ed299
Remove git installation from Dockerfile and update .dockerignore to a…
aristarkhovNV Mar 30, 2026
ebae3f3
Update Docker Buildx action to version 4.0.0 in build workflow
aristarkhovNV Mar 30, 2026
a161b0b
Update Docker build step to use build-push-action for teleop_ros2 image
aristarkhovNV Mar 30, 2026
c7973c4
Clean up build artifacts after installation in Dockerfile
aristarkhovNV Mar 30, 2026
c15d8fb
Update cache mode in build workflow and simplify Dockerfile build steps
aristarkhovNV Mar 30, 2026
630d0d3
Use caching only for teleop_ros2 base stage in Docker build workflow
aristarkhovNV Mar 30, 2026
8ee44eb
Refactor Docker build step for teleop_ros2 image to use direct docker…
aristarkhovNV Mar 30, 2026
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
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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 building from source for ros2 workflows
!cmake/
!deps/
!src/
!CMakeLists.txt
!VERSION
Comment on lines +1 to +21
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Redundant pattern at line 10.

Line 10 (!deps/cloudxr/) is redundant because line 18 (!deps/) already re-includes the entire deps/ directory. Consider removing line 10 and its associated comment.

🔧 Suggested fix
 # 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 building from source for ros2 workflows
+# Allow CloudXR Dockerfiles, runtime assets, and building from source for ros2 workflows
 !cmake/
 !deps/
 !src/
 !CMakeLists.txt
 !VERSION
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.dockerignore around lines 1 - 21, Remove the redundant allow-pattern and
its comment: delete the line containing "!deps/cloudxr/" (and the preceding
comment "Allow CloudXR Dockerfiles and runtime assets." if present) because the
later pattern "!deps/" already re-includes the entire deps/ tree; update
.dockerignore so only the broader "!deps/" entry remains.

21 changes: 14 additions & 7 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,21 @@ jobs:
ngc-cli-api-key: ${{ secrets.NGC_TELEOP_CORE_GITHUB_SERVICE_KEY }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4.0.0

- name: Build teleop_ros2 image
run: |
docker build -f examples/teleop_ros2/Dockerfile \
--build-arg ROS_DISTRO=${{ matrix.ros_distro }} \
--build-arg PYTHON_VERSION=${{ matrix.python_version }} \
-t teleop_ros2_ref:${{ matrix.ros_distro }} .
uses: docker/build-push-action@v7
with:
context: .
file: examples/teleop_ros2/Dockerfile
build-args: |
ROS_DISTRO=${{ matrix.ros_distro }}
PYTHON_VERSION=${{ matrix.python_version }}
tags: teleop_ros2_ref:${{ matrix.ros_distro }}
load: true
push: false
cache-from: type=gha,scope=teleop-ros2-${{ matrix.ros_distro }}
cache-to: type=gha,mode=min,scope=teleop-ros2-${{ matrix.ros_distro }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

context: . currently defeats incremental gains due to overly broad .dockerignore allowlist.

Line 173 switches to repo-root context, but .dockerignore currently unignores all of examples/. That sends far more files than needed on every build and weakens cache efficiency.

Suggested fix (narrow allowlist in .dockerignore)
-!examples/
+!examples/
+# Re-ignore all examples content, then allow only required paths.
+examples/**
+!examples/teleop_ros2/
+!examples/teleop_ros2/**
+!examples/oxr/
+!examples/oxr/python/
+!examples/oxr/python/**
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-ubuntu.yml around lines 171 - 182, The GitHub Action
uses docker/build-push-action@v7 with context: . and file:
examples/teleop_ros2/Dockerfile, but your .dockerignore currently unignores all
of examples/, sending unnecessary files and killing cache effectiveness; open
.dockerignore and replace the broad unignore (e.g., "!examples/") with a narrow
allowlist that only unignores the exact build context and required files (for
example "examples/teleop_ros2/**", plus any specific top-level files the
Dockerfile needs such as LICENSE or build scripts), or alternatively change the
action's context to examples/teleop_ros2 to avoid sending the repo root—apply
the approach that best fits the Dockerfile dependencies.


- name: Smoke test (ROS 2 + rclpy)
run: |
Expand Down Expand Up @@ -208,7 +215,7 @@ jobs:
tar -xvf isaacteleop-install.tar -C install

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4.0.0

- name: Run Tests with CloudXR
env:
Expand Down
208 changes: 108 additions & 100 deletions cmake/IsaacTeleopVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,87 +14,19 @@
# * RC (CI + branch release/X.Y.x): branch must match base version; Python version X.Y.PATCHrc, no local.
# * Local working copy (non-CI): Python version X.Y+local and CMake version X.Y (patch omitted).
function(isaac_teleop_read_version version_file out_cmake_version_var out_pyproject_version_var)
find_package(Git REQUIRED)
get_filename_component(_isaac_teleop_version_file "${version_file}" ABSOLUTE)
if(NOT EXISTS "${_isaac_teleop_version_file}")
message(FATAL_ERROR "Version file not found: ${_isaac_teleop_version_file}")
endif()
file(READ "${_isaac_teleop_version_file}" _isaac_teleop_version_base)
string(STRIP "${_isaac_teleop_version_base}" _isaac_teleop_version_base)

execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${CMAKE_CURRENT_SOURCE_DIR}" rev-parse --show-toplevel
OUTPUT_VARIABLE _isaac_teleop_git_root
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_git_root_result
)
if(NOT _isaac_teleop_git_root_result EQUAL 0 OR _isaac_teleop_git_root STREQUAL "")
message(FATAL_ERROR "Failed to determine git root. Ensure this is a git repository and git is available.")
endif()
execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${_isaac_teleop_git_root}" rev-list -n 1 HEAD -- "${_isaac_teleop_version_file}"
OUTPUT_VARIABLE _isaac_teleop_version_commit
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_version_commit_result
)
if(NOT _isaac_teleop_version_commit_result EQUAL 0 OR _isaac_teleop_version_commit STREQUAL "")
message(FATAL_ERROR "Failed to locate last commit for version file: ${_isaac_teleop_version_file}")
endif()
execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${_isaac_teleop_git_root}" rev-list --count "${_isaac_teleop_version_commit}..HEAD"
OUTPUT_VARIABLE _isaac_teleop_git_count
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_git_count_result
)
if(NOT _isaac_teleop_git_count_result EQUAL 0)
message(FATAL_ERROR "Failed to count commits since ${_isaac_teleop_version_commit}.")
endif()
if(NOT _isaac_teleop_git_count MATCHES "^[0-9]+$")
message(FATAL_ERROR "Invalid git commit count: '${_isaac_teleop_git_count}'")
endif()

execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${_isaac_teleop_git_root}" rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE _isaac_teleop_git_branch
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_git_branch_result
)
if(NOT _isaac_teleop_git_branch_result EQUAL 0 OR _isaac_teleop_git_branch STREQUAL "")
message(FATAL_ERROR "Failed to determine git branch name.")
endif()
if(_isaac_teleop_git_branch STREQUAL "HEAD")
if(DEFINED ENV{GITHUB_REF_NAME} AND NOT "$ENV{GITHUB_REF_NAME}" STREQUAL "")
set(_isaac_teleop_git_branch "$ENV{GITHUB_REF_NAME}")
elseif(DEFINED ENV{GITHUB_HEAD_REF} AND NOT "$ENV{GITHUB_HEAD_REF}" STREQUAL "")
set(_isaac_teleop_git_branch "$ENV{GITHUB_HEAD_REF}")
elseif(DEFINED ENV{CI_COMMIT_REF_NAME} AND NOT "$ENV{CI_COMMIT_REF_NAME}" STREQUAL "")
set(_isaac_teleop_git_branch "$ENV{CI_COMMIT_REF_NAME}")
endif()
endif()

execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${_isaac_teleop_git_root}" describe --tags --exact-match
OUTPUT_VARIABLE _isaac_teleop_git_tag
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_git_tag_result
)
if(NOT _isaac_teleop_git_tag_result EQUAL 0)
set(_isaac_teleop_git_tag "")
endif()

string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.x" _isaac_teleop_version_match "${_isaac_teleop_version_base}")
if(NOT _isaac_teleop_version_match)
message(FATAL_ERROR "Base version must be in MAJOR.MINOR.x format; actual content: '${_isaac_teleop_version_base}'")
endif()
set(_isaac_teleop_version_major "${CMAKE_MATCH_1}")
set(_isaac_teleop_version_minor "${CMAKE_MATCH_2}")
set(_isaac_teleop_version_patch "${_isaac_teleop_git_count}")
set(_isaac_teleop_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}.${_isaac_teleop_version_patch}")

set(_isaac_teleop_is_ci FALSE)
if(DEFINED ENV{CI} AND NOT "$ENV{CI}" STREQUAL "")
Expand All @@ -104,46 +36,122 @@ function(isaac_teleop_read_version version_file out_cmake_version_var out_pyproj
endif()
endif()

set(_isaac_teleop_pyproject_version "")
set(_isaac_teleop_git_count "0")
set(_isaac_teleop_git_branch "")
set(_isaac_teleop_git_tag "")
set(_isaac_teleop_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}")
set(_isaac_teleop_build_kind "local")
set(_isaac_teleop_pyproject_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}+local")

if(_isaac_teleop_is_ci)
find_package(Git REQUIRED)

if(_isaac_teleop_is_ci AND NOT _isaac_teleop_git_tag STREQUAL "")
if(NOT _isaac_teleop_git_tag MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)$")
message(FATAL_ERROR "Invalid release tag format: '${_isaac_teleop_git_tag}' (expected vMAJOR.MINOR.PATCH)")
execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${CMAKE_CURRENT_SOURCE_DIR}" rev-parse --show-toplevel
OUTPUT_VARIABLE _isaac_teleop_git_root
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_git_root_result
)
if(NOT _isaac_teleop_git_root_result EQUAL 0 OR _isaac_teleop_git_root STREQUAL "")
message(FATAL_ERROR "Failed to determine git root. Ensure this is a git repository and git is available.")
endif()
set(_isaac_teleop_tag_version "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
if(NOT _isaac_teleop_tag_version STREQUAL "${_isaac_teleop_version}")
message(FATAL_ERROR "Release tag ${_isaac_teleop_git_tag} does not match calculated version ${_isaac_teleop_version}.")
execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${_isaac_teleop_git_root}" rev-list -n 1 HEAD -- "${_isaac_teleop_version_file}"
OUTPUT_VARIABLE _isaac_teleop_version_commit
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_version_commit_result
)
if(NOT _isaac_teleop_version_commit_result EQUAL 0 OR _isaac_teleop_version_commit STREQUAL "")
message(FATAL_ERROR "Failed to locate last commit for version file: ${_isaac_teleop_version_file}")
endif()
set(_isaac_teleop_pyproject_version "${_isaac_teleop_tag_version}")
set(_isaac_teleop_build_kind "release")
elseif(_isaac_teleop_is_ci AND _isaac_teleop_git_branch MATCHES "^release/([0-9]+)\\.([0-9]+)\\.x$")
if(NOT "${CMAKE_MATCH_1}" STREQUAL "${_isaac_teleop_version_major}" OR NOT "${CMAKE_MATCH_2}" STREQUAL "${_isaac_teleop_version_minor}")
message(FATAL_ERROR "Release branch ${_isaac_teleop_git_branch} does not match base version ${_isaac_teleop_version_base}.")
execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${_isaac_teleop_git_root}" rev-list --count "${_isaac_teleop_version_commit}..HEAD"
OUTPUT_VARIABLE _isaac_teleop_git_count
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_git_count_result
)
if(NOT _isaac_teleop_git_count_result EQUAL 0)
message(FATAL_ERROR "Failed to count commits since ${_isaac_teleop_version_commit}.")
endif()
set(_isaac_teleop_pyproject_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}.${_isaac_teleop_version_patch}rc1")
set(_isaac_teleop_build_kind "rc")
elseif(_isaac_teleop_is_ci AND _isaac_teleop_git_branch STREQUAL "main")
set(_isaac_teleop_pyproject_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}.${_isaac_teleop_version_patch}a1")
set(_isaac_teleop_build_kind "alpha")
elseif(_isaac_teleop_is_ci)
string(TOLOWER "${_isaac_teleop_git_branch}" _isaac_teleop_label)
string(REGEX REPLACE "[^a-z0-9._-]" "." _isaac_teleop_label "${_isaac_teleop_label}") # replace disallowed chars with dots
string(REGEX REPLACE "[._-]+" "." _isaac_teleop_label "${_isaac_teleop_label}") # collapse separator runs to a single dot
string(REGEX REPLACE "^[._-]+" "" _isaac_teleop_label "${_isaac_teleop_label}") # trim leading separators
string(REGEX REPLACE "[._-]+$" "" _isaac_teleop_label "${_isaac_teleop_label}") # trim trailing separators
if(_isaac_teleop_label STREQUAL "")
set(_isaac_teleop_label "unknown")
if(NOT _isaac_teleop_git_count MATCHES "^[0-9]+$")
message(FATAL_ERROR "Invalid git commit count: '${_isaac_teleop_git_count}'")
endif()

execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${_isaac_teleop_git_root}" rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE _isaac_teleop_git_branch
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_git_branch_result
)
if(NOT _isaac_teleop_git_branch_result EQUAL 0 OR _isaac_teleop_git_branch STREQUAL "")
message(FATAL_ERROR "Failed to determine git branch name.")
endif()
if(_isaac_teleop_git_branch STREQUAL "HEAD")
if(DEFINED ENV{GITHUB_REF_NAME} AND NOT "$ENV{GITHUB_REF_NAME}" STREQUAL "")
set(_isaac_teleop_git_branch "$ENV{GITHUB_REF_NAME}")
elseif(DEFINED ENV{GITHUB_HEAD_REF} AND NOT "$ENV{GITHUB_HEAD_REF}" STREQUAL "")
set(_isaac_teleop_git_branch "$ENV{GITHUB_HEAD_REF}")
elseif(DEFINED ENV{CI_COMMIT_REF_NAME} AND NOT "$ENV{CI_COMMIT_REF_NAME}" STREQUAL "")
set(_isaac_teleop_git_branch "$ENV{CI_COMMIT_REF_NAME}")
endif()
endif()

execute_process(
COMMAND "${GIT_EXECUTABLE}" -C "${_isaac_teleop_git_root}" describe --tags --exact-match
OUTPUT_VARIABLE _isaac_teleop_git_tag
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
RESULT_VARIABLE _isaac_teleop_git_tag_result
)
if(NOT _isaac_teleop_git_tag_result EQUAL 0)
set(_isaac_teleop_git_tag "")
endif()

set(_isaac_teleop_version_patch "${_isaac_teleop_git_count}")
set(_isaac_teleop_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}.${_isaac_teleop_version_patch}")

if(NOT _isaac_teleop_git_tag STREQUAL "")
if(NOT _isaac_teleop_git_tag MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)$")
message(FATAL_ERROR "Invalid release tag format: '${_isaac_teleop_git_tag}' (expected vMAJOR.MINOR.PATCH)")
endif()
set(_isaac_teleop_tag_version "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
if(NOT _isaac_teleop_tag_version STREQUAL "${_isaac_teleop_version}")
message(FATAL_ERROR "Release tag ${_isaac_teleop_git_tag} does not match calculated version ${_isaac_teleop_version}.")
endif()
set(_isaac_teleop_pyproject_version "${_isaac_teleop_tag_version}")
set(_isaac_teleop_build_kind "release")
elseif(_isaac_teleop_git_branch MATCHES "^release/([0-9]+)\\.([0-9]+)\\.x$")
if(NOT "${CMAKE_MATCH_1}" STREQUAL "${_isaac_teleop_version_major}" OR NOT "${CMAKE_MATCH_2}" STREQUAL "${_isaac_teleop_version_minor}")
message(FATAL_ERROR "Release branch ${_isaac_teleop_git_branch} does not match base version ${_isaac_teleop_version_base}.")
endif()
set(_isaac_teleop_pyproject_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}.${_isaac_teleop_version_patch}rc1")
set(_isaac_teleop_build_kind "rc")
elseif(_isaac_teleop_git_branch STREQUAL "main")
set(_isaac_teleop_pyproject_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}.${_isaac_teleop_version_patch}a1")
set(_isaac_teleop_build_kind "alpha")
else()
string(TOLOWER "${_isaac_teleop_git_branch}" _isaac_teleop_label)
string(REGEX REPLACE "[^a-z0-9._-]" "." _isaac_teleop_label "${_isaac_teleop_label}") # replace disallowed chars with dots
string(REGEX REPLACE "[._-]+" "." _isaac_teleop_label "${_isaac_teleop_label}") # collapse separator runs to a single dot
string(REGEX REPLACE "^[._-]+" "" _isaac_teleop_label "${_isaac_teleop_label}") # trim leading separators
string(REGEX REPLACE "[._-]+$" "" _isaac_teleop_label "${_isaac_teleop_label}") # trim trailing separators
if(_isaac_teleop_label STREQUAL "")
set(_isaac_teleop_label "unknown")
endif()
set(_isaac_teleop_pyproject_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}.${_isaac_teleop_version_patch}.dev0+${_isaac_teleop_label}")
set(_isaac_teleop_build_kind "dev")
endif()
set(_isaac_teleop_pyproject_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}.${_isaac_teleop_version_patch}.dev0+${_isaac_teleop_label}")
set(_isaac_teleop_build_kind "dev")
else()
set(_isaac_teleop_pyproject_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}+local")
set(_isaac_teleop_build_kind "local")
set(_isaac_teleop_version "${_isaac_teleop_version_major}.${_isaac_teleop_version_minor}")
endif()

set(${out_cmake_version_var} "${_isaac_teleop_version}" PARENT_SCOPE)
set(${out_pyproject_version_var} "${_isaac_teleop_pyproject_version}" PARENT_SCOPE)
message(STATUS "IsaacTeleop version: ${_isaac_teleop_version} (${_isaac_teleop_version_base} + ${_isaac_teleop_git_count} commits) python: ${_isaac_teleop_pyproject_version} kind: ${_isaac_teleop_build_kind}")
if(_isaac_teleop_is_ci)
message(STATUS "IsaacTeleop version: ${_isaac_teleop_version} (${_isaac_teleop_version_base} + ${_isaac_teleop_git_count} commits) python: ${_isaac_teleop_pyproject_version} kind: ${_isaac_teleop_build_kind}")
else()
message(STATUS "IsaacTeleop version: ${_isaac_teleop_version} (${_isaac_teleop_version_base}; local build) python: ${_isaac_teleop_pyproject_version} kind: ${_isaac_teleop_build_kind}")
endif()
endfunction()
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
2 changes: 0 additions & 2 deletions examples/teleop_ros2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ ARG PYTHON_VERSION

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
clang-format \
cmake \
git \
pkg-config \
&& rm -rf /var/lib/apt/lists/*

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