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

Test if python launcher command works #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions .github/workflows/check_container_running.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
python3 run_container.py -host pr1040 -mount ./launch -name sample.launch device:=auto input_image:=/kinect_head/rgb/image_color &
PYTHON_PID=$!
sleep 15
if ps -p $PYTHON_PID > /dev/null; then
echo "Container is running"
kill -9 $PYTHON_PID
exit 0
else
echo "Container is not running (unexpected)"
exit 1
fi
3 changes: 3 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ jobs:
- name: rostest
run: |
docker run --rm detic_ros:latest /bin/bash -i -c "source ~/.bashrc; rostest detic_ros test_node.test"
- name: test main python scirpt
run: |
bash .github/workflows/check_container_running.sh
2 changes: 1 addition & 1 deletion run_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def add_prefix(file_path: Path, prefix: str) -> Path:
docker_run_command = """
docker run \
-v {tmp_launch_path}:{detic_ros_root}/launch \
--rm --net=host -it \
--rm --net=host \
--gpus 1 detic_ros:latest \
/bin/bash -i -c \
"source ~/.bashrc; \
Expand Down
Loading