Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to run list and run build #639

Merged
merged 6 commits into from
Dec 13, 2024
Merged

Conversation

agirault
Copy link
Contributor

Context

While preparing support for generating packages from the run and dev_container scripts, having a good list mechanism seemed like it would impact existing infrastructure. Instead of a large MR that mixes infra improvements and packaging support, this MR is scoped for infra improvements that the packaging support will then be able to leverage.

Changes

List improvements

  • list applications, operators, and packages
  • uses simpler but more robust heuristic based on required cmake functions needed to configure these targets (while the metadata.json should be present but might not be)

Build improvements

  • support building operators in addition to apps
  • verify input validity using the improve listing from the last commit
  • allow passing a path to the app/operator dir, for improve UX by leveraging
    terminal autocompletion

Results

List improvements

  • enhanced human-readable list of targets to build or package
$ ./run list

== APPLICATIONS =================

adv_networking_bench
basic_networking_ping
body_pose_estimation
colonoscopy_segmentation
cvcuda_basic
dds_video
deltacast_transmitter
endoscopy_depth_estimation
endoscopy_out_of_body_detection
endoscopy_tool_tracking
evt_cam_calibration
grpc_endoscopy_tool_tracking
grpc_h264_endoscopy_tool_tracking
h264_endoscopy_tool_tracking
h264_video_decode
high_speed_endoscopy
holoviz_hdr
holoviz_srgb
holoviz_ui
holoviz_vsync
holoviz_yuv
hyperspectral_segmentation
imaging_ai_segmentator
laser_detection
model_benchmarking
multiai_endoscopy
multiai_ultrasound
network_radar_pipeline
nvidia_nim_chat
nvidia_nim_imaging
nvidia_nim_nvclip
object_detection_torch
openigtlink_3dslicer
orsi_in_out_body
orsi_multi_ai_ar
orsi_segmentation_ar
prohawk_video_replayer
pva_video_filter
qt_video_replayer
realsense_visualizer
simple_pdw_pipeline
simple_radar_pipeline
tao_peoplenet
ucx_endoscopy_tool_tracking
ucx_h264_endoscopy_tool_tracking
ultrasound_segmentation
usb_cam_calibration
velodyne_lidar_app
video_deidentification
volume_rendering
volume_rendering_xr
webrtc_video_server
xr_hello_holoscan

== OPERATORS ====================

advanced_network
apriltag_detector
basic_network
cvcuda_holoscan_interop
dds_shapes_subscriber
dds_video_publisher
dds_video_subscriber
deltacast_videomaster
emergent_source
grpc_operators
lstm_tensor_rt_inference
npp_filter
openigtlink
orsi_format_converter
orsi_segmentation_postprocessor
orsi_segmentation_preprocessor
orsi_visualizer
prohawk_video_processing
qt_video
realsense_camera
tensor_to_video_buffer
tool_tracking_postprocessor
velodyne_lidar
video_encoder
volume_loader
volume_renderer
vtk_renderer
xr_basic_render
XrFrameOp
XrTransformOp
yuan_qcap

== PACKAGES =====================

holoscan-networking

=================================
  • specialized listing that can more easily be parsed by code
$ ./run list_apps

adv_networking_bench
basic_networking_ping
body_pose_estimation
colonoscopy_segmentation
cvcuda_basic
dds_video
deltacast_transmitter
endoscopy_depth_estimation
endoscopy_out_of_body_detection
endoscopy_tool_tracking
evt_cam_calibration
grpc_endoscopy_tool_tracking
grpc_h264_endoscopy_tool_tracking
h264_endoscopy_tool_tracking
h264_video_decode
high_speed_endoscopy
holoviz_hdr
holoviz_srgb
holoviz_ui
holoviz_vsync
holoviz_yuv
hyperspectral_segmentation
imaging_ai_segmentator
laser_detection
model_benchmarking
multiai_endoscopy
multiai_ultrasound
network_radar_pipeline
nvidia_nim_chat
nvidia_nim_imaging
nvidia_nim_nvclip
object_detection_torch
openigtlink_3dslicer
orsi_in_out_body
orsi_multi_ai_ar
orsi_segmentation_ar
prohawk_video_replayer
pva_video_filter
qt_video_replayer
realsense_visualizer
simple_pdw_pipeline
simple_radar_pipeline
tao_peoplenet
ucx_endoscopy_tool_tracking
ucx_h264_endoscopy_tool_tracking
ultrasound_segmentation
usb_cam_calibration
velodyne_lidar_app
video_deidentification
volume_rendering
volume_rendering_xr
webrtc_video_server
xr_hello_holoscan

Build improvements

  • Building operators now works also
$ ./run build dds_shapes_subscriber

Building dds_shapes_subscriber
[command] cmake -S . -B build/dds_shapes_subscriber --no-warn-unused-cli -D Python3_EXECUTABLE=/usr/bin/python3 -D Python3_ROOT_DIR=/usr/lib/python3 -D HOLOHUB_DATA_DIR:PATH=/home/agirault/projects/holoscan/holohub/data -D CMAKE_BUILD_TYPE=release -D OP_dds_shapes_subscriber:BOOL=1
Not searching for unused variables given on the command line.
-- The CXX compiler identification is GNU 11.4.0
...
  • Can pass a path to the app or operator, improving UX by leveraging fast terminal autocomplete
$ ./run build applications/h264/h264_endoscopy_tool_tracking/

Building h264_endoscopy_tool_tracking
[command] cmake -S . -B build/h264_endoscopy_tool_tracking --no-warn-unused-cli -D Python3_EXECUTABLE=/usr/bin/python3 -D Python3_ROOT_DIR=/usr/lib/python3 -D HOLOHUB_DATA_DIR:PATH=/workspace/holohub/data -D CMAKE_BUILD_TYPE=release -D APP_h264_endoscopy_tool_tracking:BOOL=1
Not searching for unused variables given on the command line.
-- The CXX compiler identification is GNU 11.4.0
...
  • Passing invalid value gets an early failure
$ ./run build nein

ERROR: Unknown application or operator: nein
You can run ./run list for a full list of options.

@agirault agirault added the enhancement New feature or request label Dec 13, 2024
@agirault agirault requested review from jjomier and tbirdso December 13, 2024 03:55
@agirault agirault self-assigned this Dec 13, 2024
run
# Build HoloHub sample apps
list_desc() {
echo ""
echo "Display the list of applications to run."
echo "Display the list of packages, applications, and operators to build."
echo "Usage: ./run list"
echo ""
}

list() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like the autocompletion_list below could also be updated to use some of the logic changed here... though it might need more love than that, since I was confused why apps where even listed, or what some of the options in there related to (cpp, python).

Happy to update it if I get some confirmation on the expected behavior and on the parts that don't currently seem correct in there.

Copy link
Contributor

Choose a reason for hiding this comment

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

Going to defer to @jjomier as I haven't touched the autocomplete implementation before. I'm OK with moving forward without in this PR and updating as necessary.

run Show resolved Hide resolved
run Show resolved Hide resolved
run Show resolved Hide resolved
@agirault agirault force-pushed the ag/package-holohub-infra branch 3 times, most recently from ba23d27 to 6dc6e81 Compare December 13, 2024 19:12
Base automatically changed from ag/ano-cpack to main December 13, 2024 20:36
@agirault agirault force-pushed the ag/package-holohub-infra branch 4 times, most recently from a058db0 to 724cf40 Compare December 13, 2024 21:06
Signed-off-by: Alexis Girault <[email protected]>
Also:
- verify input validity using the improve listing from the last commit
- allow passing a path to the app/operator dir, for improve UX by leveraging
terminal autocompletion

Signed-off-by: Alexis Girault <[email protected]>
@agirault agirault force-pushed the ag/package-holohub-infra branch from 724cf40 to 733bb52 Compare December 13, 2024 21:25
Copy link
Contributor

@tbirdso tbirdso left a comment

Choose a reason for hiding this comment

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

Update to include pkg looks good. LGTM, merge away

README.md Outdated Show resolved Hide resolved
Co-authored-by: Tom Birdsong <[email protected]>
Signed-off-by: Alexis Girault <[email protected]>
@agirault agirault merged commit 0e89c6e into main Dec 13, 2024
6 checks passed
@agirault agirault deleted the ag/package-holohub-infra branch December 13, 2024 23:32
agirault added a commit that referenced this pull request Dec 17, 2024
Regression introduced in #639

was only looking for cmake targets, did not account for pure python targets

Signed-off-by: Alexis Girault <[email protected]>
agirault added a commit that referenced this pull request Dec 17, 2024
Regression introduced in #639

was only looking for cmake targets, did not account for pure python targets

Signed-off-by: Alexis Girault <[email protected]>
agirault added a commit that referenced this pull request Dec 17, 2024
* Fix run list for non-cmake targets

Regression introduced in #639

was only looking for cmake targets, did not account for pure python targets

Signed-off-by: Alexis Girault <[email protected]>

* Ignore templated pathname in run list

Ignore {{cookiecutter.project_slug}}

Signed-off-by: Alexis Girault <[email protected]>

---------

Signed-off-by: Alexis Girault <[email protected]>
campnarvis pushed a commit to TUM-CAMP-NARVIS/holohub-narvis that referenced this pull request Dec 26, 2024
* Improve ./run list results

Signed-off-by: Alexis Girault <[email protected]>

* Allow to build operators with run script

Also:
- verify input validity using the improve listing from the last commit
- allow passing a path to the app/operator dir, for improve UX by leveraging
terminal autocompletion

Signed-off-by: Alexis Girault <[email protected]>

* Allow to build packages with run script

Signed-off-by: Alexis Girault <[email protected]>

* Style improvement to remaining _desc()

Signed-off-by: Alexis Girault <[email protected]>

* Update README for build instructions

Signed-off-by: Alexis Girault <[email protected]>

* Update README.md

Co-authored-by: Tom Birdsong <[email protected]>
Signed-off-by: Alexis Girault <[email protected]>

---------

Signed-off-by: Alexis Girault <[email protected]>
Signed-off-by: Alexis Girault <[email protected]>
Co-authored-by: Tom Birdsong <[email protected]>
campnarvis pushed a commit to TUM-CAMP-NARVIS/holohub-narvis that referenced this pull request Dec 26, 2024
* Fix run list for non-cmake targets

Regression introduced in nvidia-holoscan#639

was only looking for cmake targets, did not account for pure python targets

Signed-off-by: Alexis Girault <[email protected]>

* Ignore templated pathname in run list

Ignore {{cookiecutter.project_slug}}

Signed-off-by: Alexis Girault <[email protected]>

---------

Signed-off-by: Alexis Girault <[email protected]>
cliffburdick pushed a commit to cliffburdick/holohub that referenced this pull request Jan 23, 2025
* Improve ./run list results

Signed-off-by: Alexis Girault <[email protected]>

* Allow to build operators with run script

Also:
- verify input validity using the improve listing from the last commit
- allow passing a path to the app/operator dir, for improve UX by leveraging
terminal autocompletion

Signed-off-by: Alexis Girault <[email protected]>

* Allow to build packages with run script

Signed-off-by: Alexis Girault <[email protected]>

* Style improvement to remaining _desc()

Signed-off-by: Alexis Girault <[email protected]>

* Update README for build instructions

Signed-off-by: Alexis Girault <[email protected]>

* Update README.md

Co-authored-by: Tom Birdsong <[email protected]>
Signed-off-by: Alexis Girault <[email protected]>

---------

Signed-off-by: Alexis Girault <[email protected]>
Signed-off-by: Alexis Girault <[email protected]>
Co-authored-by: Tom Birdsong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants