Skip to content

Commit

Permalink
Jkeller/robot dockerfile bugfix (#197)
Browse files Browse the repository at this point in the history
* trying to debug libimath problem

* debugging

* fixed bug in arg usage

* fixed issue where apt installing libimath-dev for the sim robot was causing necessary ros2 packages from being automatically removed, breaking the build. This issue doesn't happen when libimath-dev is installed on the jetsons

---------

Co-authored-by: caomuqing <[email protected]>
  • Loading branch information
jfkeller and caomuqing authored Jan 29, 2025
1 parent 8f76293 commit 8fc845f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
15 changes: 13 additions & 2 deletions robot/docker/Dockerfile.robot
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ RUN apt remove -y libopenvdb*; \
cd ..; rm -rf /opt/openvdb/build

# Add ability to SSH
RUN apt-get update && apt-get install -y openssh-server libimath-dev
RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd

# Password is airstack
Expand All @@ -120,7 +120,18 @@ RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

EXPOSE 22


ARG REAL_ROBOT=false
RUN if [ "$REAL_ROBOT" = "true" ]; then \
# Put commands here that should run for the real robot but not the sim

echo "REAL_ROBOT is true"; \
apt-get update && apt-get install -y libimath-dev; \
else \
# Put commands here that should be run for the sim but not the real robot

echo "REAL_ROBOT is false"; \
fi

# Cleanup. Prevent people accidentally doing git commits as root in Docker
RUN apt purge git -y \
Expand Down
1 change: 1 addition & 0 deletions robot/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ services:
dockerfile: ./Dockerfile.robot
args:
BASE_IMAGE: nvcr.io/nvidia/l4t-jetpack:r36.4.0
REAL_ROBOT: true
tags:
- *l4t_image
# we use tmux send-keys so that the session stays alive
Expand Down

0 comments on commit 8fc845f

Please sign in to comment.