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

Dockerfile for Humble version #72

Open
fatemeh-mohseni-AI opened this issue May 21, 2024 · 0 comments
Open

Dockerfile for Humble version #72

fatemeh-mohseni-AI opened this issue May 21, 2024 · 0 comments
Labels
question Further information is requested

Comments

@fatemeh-mohseni-AI
Copy link

Branch

humble-devel

Question

I have build a sample Dockerfile for Humble version, but it has some errors .
Do you have any Dockerfile for Humble version ?

this is mine :

FROM --platform=linux/amd64 ros:humble-ros-base

ENV repo=/root/ros2_ws/src/Ros2_Yolov8
ENV wd=/root/ros2_ws
ENV ROS_DISTRO=humble

RUN mkdir -p $repo
WORKDIR $wd

COPY . $repo

# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive


# Add ROS 2 package repositories
RUN apt-get update && apt-get install -y software-properties-common && \
    add-apt-repository universe && \
    apt-add-repository restricted && \
    apt-add-repository multiverse && \
    apt-get update

# Install required packages
RUN apt-get update && apt-get upgrade -y && \
    apt-get install --no-install-recommends -y \
        python3-pip \
        ros-$ROS_DISTRO-ament-cmake \
        ros-$ROS_DISTRO-rclpy \
        ros-$ROS_DISTRO-sensor-msgs \
        ros-$ROS_DISTRO-vision-msgs \
        ros-$ROS_DISTRO-cv-bridge \
        ros-$ROS_DISTRO-image-geometry \
        ros-$ROS_DISTRO-image-transport \
        ros-$ROS_DISTRO-pcl-ros \
        ros-$ROS_DISTRO-image-view \
        python3-rosdep \
        python-is-python3 \
        ffmpeg libsm6 libxext6 && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

RUN rosdep fix-permissions && \
    rosdep update --include-eol-distros && \
    rosdep install -r -y -i --from-paths . && \
    python3 -m pip install -r $repo/requirements.txt && \
    /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash && colcon build"


# Make the entrypoint script executable
RUN chmod +x $repo/docker/entrypoint.sh

# Set the entrypoint to the script
ENTRYPOINT ["/root/ros2_ws/src/Ros2_Yolov8/docker/entrypoint.sh"]
#CMD ["ros2", "launch", "ultralytics_ros", "tracker.launch.xml", "debug:=true"]

Additional

No response

@fatemeh-mohseni-AI fatemeh-mohseni-AI added the question Further information is requested label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant