Skip to content

Commit

Permalink
fix: docker torch
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGuyWithoutH committed Aug 3, 2024
1 parent 13e6302 commit ac300b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions docker_humble_jetson_torch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ FROM dustynv/ros:humble-desktop-pytorch-l4t-r35.4.1 AS base

ARG DEBIAN_FRONTEND=noninteractive

# commands will be appended/run by the entrypoint which sources the ROS environment
COPY ros_entrypoint.sh ros2_install.sh /

# Install language
RUN apt-get update && apt-get install -y locales \
&& locale-gen en_US en_US.UTF-8 \
Expand Down Expand Up @@ -114,10 +111,15 @@ COPY ./EposCmd/misc/99-ftdi.rules .
COPY ./EposCmd/misc/99-epos4.rules .
RUN /etc/init.d/udev restart

WORKDIR /home

# commands will be appended/run by the entrypoint which sources the ROS environment
COPY ros_entrypoint.sh ros2_install.sh .

# Install common ROS 2 packages
RUN apt-get update && apt-get upgrade -y
RUN apt-get purge -y '*opencv*'
RUN /ros2_install.sh \
RUN ./ros2_install.sh \
ros-${ROS_DISTRO}-behaviortree-cpp-v3 \
ros-${ROS_DISTRO}-xacro

Expand Down
6 changes: 3 additions & 3 deletions docker_humble_jetson_torch/ros2_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ colcon build ${COLCON_FLAGS} --base-paths src --event-handlers console_direct+

#rm ${ROS_WORKSPACE}/*.rosinstall

if grep $ROS_WORKSPACE /ros_entrypoint.sh; then
if grep $ROS_WORKSPACE ./ros_entrypoint.sh; then
echo "workspace $ROS_WORKSPACE was already set to be sourced on startup:"
else
tac /ros_entrypoint.sh | sed -e "3iros_source_env $ROS_WORKSPACE/install/setup.bash" | tac | tee /ros_entrypoint.sh
tac ./ros_entrypoint.sh | sed -e "3iros_source_env $ROS_WORKSPACE/install/setup.bash" | tac | tee ./ros_entrypoint.sh
echo "added $ROS_WORKSPACE to be sourced on startup:"
fi

echo ""
cat /ros_entrypoint.sh
cat ./ros_entrypoint.sh

if [ "$SOURCE" = "rosinstall_generator" ]; then
source $ROS_WORKSPACE/install/setup.bash
Expand Down

0 comments on commit ac300b6

Please sign in to comment.