Skip to content

Commit

Permalink
Entrypoint fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Ettore Landini <[email protected]>
  • Loading branch information
elandini84 committed May 29, 2024
1 parent b3555fb commit b5a94f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docker_stuff/docker_sim2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,11 @@ sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

# Set ROS2 environment
RUN echo "#!/bin/bash" >> /home/user1/.entrypoint.sh
RUN echo "source /opt/ros/${ros_distro}/setup.bash" >> /home/user1/.entrypoint.bash
RUN echo "source ${robotology_install_folder}/yarp-devices-ros2/ros2_interfaces_ws/install/local_setup.bash" >> /home/user1/.entrypoint.bash
ENTRYPOINT [ "/home/user1/.entrypoint.bash" ]
RUN chmod +x /home/user1/.entrypoint.sh
ENTRYPOINT [ "/home/user1/.entrypoint.sh" ]

WORKDIR ${user1_home}/tour-guide-robot
RUN sudo updatedb
Expand Down
2 changes: 1 addition & 1 deletion docker_stuff/docker_sim2/manage-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ else
sudo xhost +
if [[ $RUN_WITH_GPU == "true" ]]; then
sudo docker run --rm -it --privileged --network host --pid host -e NVIDIA_DRIVER_CAPABILITIES=all -e DISPLAY -e ROS_DOMAIN_ID=${ROS_DOMAIN_ID} -v /tmp/.X11-unix:/tmp/.X11-unix -e QT_X11_NO_MITSHM=1 --gpus all $COMPLETE_IMAGE_NAME
elif [[ $RUN_WITH_GPU == "false" && $IMAGE == $UBUNTU_DEF ]]; then
elif [[ $RUN_WITH_GPU == "false" ]]; then
sudo docker run --rm -it --privileged --network host --pid host -e DISPLAY -e ROS_DOMAIN_ID=${ROS_DOMAIN_ID} -v /tmp/.X11-unix:/tmp/.X11-unix -e QT_X11_NO_MITSHM=1 $COMPLETE_IMAGE_NAME
else
echo "ERROR: You cannot run a nVidia based image without gpu support"
Expand Down
2 changes: 2 additions & 0 deletions docker_stuff/docker_tourCore2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,11 @@ ros-${ros_distro}-rmw-cyclonedds-cpp-dbgsym libcycloneddsidl0 && \
sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

RUN echo "#!/bin/bash" >> /home/user1/.entrypoint.sh
RUN echo "source /opt/ros/${ros_distro}/setup.bash" >> /home/user1/.entrypoint.sh
RUN echo "source ${robotology_install_folder}/yarp-devices-ros2/ros2_interfaces_ws/install/local_setup.bash" >> /home/user1/.entrypoint.sh
RUN echo "source ${robotology_install_folder}/tour-guide-robot/app/navigation2/scripts/evaluate_ip.sh" >> /home/user1/.entrypoint.sh
RUN chmod +x /home/user1/.entrypoint.sh
WORKDIR ${user1_home}
RUN sudo updatedb
# Change the lidar devices permissions inside the docker to be able to start the devices with yarprobotinterface
Expand Down

0 comments on commit b5a94f8

Please sign in to comment.