latest pushes

This commit is contained in:
Ronaldson Bellande 2024-05-14 23:38:41 -04:00
parent e02838bfaa
commit df5eaa57f8
3 changed files with 29 additions and 72 deletions

View File

@ -15,7 +15,7 @@
ARG ROS_ARCHITECTURE_VERSION=latest ARG ROS_ARCHITECTURE_VERSION=latest
FROM ronaldsonbellande/bellande_robotic_environment:latest FROM ronaldsonbellande/bellande_robotic_environment_ros1:latest
SHELL [ "/bin/bash" , "-c" ] SHELL [ "/bin/bash" , "-c" ]
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
@ -25,41 +25,31 @@ ARG ROS_ARCHITECTURE_VERSION_GIT_BRANCH=main
ARG ROS_ARCHITECTURE_VERSION_GIT_COMMIT=HEAD ARG ROS_ARCHITECTURE_VERSION_GIT_COMMIT=HEAD
ENV ROS_VERSION=noetic ENV ROS_VERSION=noetic
ENV CATKIN_WS=/root/catkin_ws ENV CATKIN_WS=/opt/ros/overlay_ws
LABEL maintainer=ronaldsonbellande@gmail.com LABEL maintainer=ronaldsonbellande@gmail.com
LABEL author=ronaldsonbellande@gmail.com LABEL author=ronaldsonbellande@gmail.com
LABEL ROS_architecture_github_branchtag=${ROS_ARCHITECTURE_VERSION_GIT_BRANCH} LABEL ROS_architecture_github_branchtag=${ROS_ARCHITECTURE_VERSION_GIT_BRANCH}
LABEL ROS_architecture_github_commit=${ROS_ARCHITECTURE_VERSION_GIT_COMMIT} LABEL ROS_architecture_github_commit=${ROS_ARCHITECTURE_VERSION_GIT_COMMIT}
# Create local catkin workspace # Create local catkin workspace and # copy every package
RUN mkdir -p $CATKIN_WS/src RUN mkdir -p $CATKIN_WS/src
COPY ../ ${CATKIN_WS}/src
# Copy Every Package
COPY ../ ${CATKIN_WS}/src
# Set the working directory for Catkin
WORKDIR $CATKIN_WS WORKDIR $CATKIN_WS
RUN export ROS_INSTALL_PATH=$(find / -name setup.bash -print) # Set the working directory for catkin
RUN ROS_VERSION=$(rosversion -d)
# Print ROS installation path and version
RUN echo "ROS installed in: $ROS_INSTALL_PATH"
RUN echo "ROS version: $ROS_VERSION"
# Initialize catkin workspace # Initialize catkin workspace
RUN catkin init \ RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash" \
&& catkin init \
&& catkin config --cmake-args -DCATKIN_ENABLE_TESTING=0 && catkin config --cmake-args -DCATKIN_ENABLE_TESTING=0
# Initialize local catkin workspace, install dependencies and build workpsace # Initialize local catkin workspace, install dependencies and build workpsace
RUN echo "source /opt/ros/${ROS_VERSION}/setup.bash" >> ~/.bashrc RUN echo "source /opt/ros/${ROS_VERSION}/setup.bash" >> ~/.bashrc \
RUN source ~/.bashrc && source ~/.bashrc
RUN cd $CATKIN_WS \ RUN cd $CATKIN_WS \
&& rosdep init \
&& rosdep update \ && rosdep update \
&& rosdep update --rosdistro ${ROS_VERSION} \
&& rosdep fix-permissions \ && rosdep fix-permissions \
&& rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_VERSION} && rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_VERSION}
@ -68,6 +58,6 @@ COPY ../scripts/catkin_setup.sh /usr/local/bin/catkin_setup.sh
RUN echo "source /usr/local/bin/catkin_setup.sh" >> /root/.bashrc RUN echo "source /usr/local/bin/catkin_setup.sh" >> /root/.bashrc
RUN chmod +x /usr/local/bin/catkin_setup.sh RUN chmod +x /usr/local/bin/catkin_setup.sh
# Run the packages and source
RUN /usr/local/bin/catkin_setup.sh RUN /usr/local/bin/catkin_setup.sh
CMD ["/bin/bash"] CMD ["/bin/bash"]

View File

@ -15,7 +15,7 @@
ARG ROS_ARCHITECTURE_VERSION=latest ARG ROS_ARCHITECTURE_VERSION=latest
FROM ubuntu:20.04 as base_build FROM ronaldsonbellande/bellande_robotic_environment_ros1:latest
SHELL [ "/bin/bash" , "-c" ] SHELL [ "/bin/bash" , "-c" ]
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
@ -24,66 +24,32 @@ ENV PYTHON_VERSION="3.8"
ARG ROS_ARCHITECTURE_VERSION_GIT_BRANCH=main ARG ROS_ARCHITECTURE_VERSION_GIT_BRANCH=main
ARG ROS_ARCHITECTURE_VERSION_GIT_COMMIT=HEAD ARG ROS_ARCHITECTURE_VERSION_GIT_COMMIT=HEAD
ARG ROS_VERSION=foxy ENV ROS_VERSION=foxy
ENV CATKIN_WS=/root/catkin_ws ENV CATKIN_WS=/opt/ros/overlay_ws
LABEL maintainer=ronaldsonbellande@gmail.com LABEL maintainer=ronaldsonbellande@gmail.com
LABEL author=ronaldsonbellande@gmail.com LABEL author=ronaldsonbellande@gmail.com
LABEL ROS_architecture_github_branchtag=${ROS_ARCHITECTURE_VERSION_GIT_BRANCH} LABEL ROS_architecture_github_branchtag=${ROS_ARCHITECTURE_VERSION_GIT_BRANCH}
LABEL ROS_architecture_github_commit=${ROS_ARCHITECTURE_VERSION_GIT_COMMIT} LABEL ROS_architecture_github_commit=${ROS_ARCHITECTURE_VERSION_GIT_COMMIT}
# Ubuntu setup # Create local catkin workspace and # copy every package
RUN apt-get update -y
RUN apt-get upgrade -y
# Set the working directory inside the Docker image
WORKDIR /
# Copy all files from the parent directory to the Docker image root
COPY ../ ./
# Create a directory for the requirements
RUN mkdir -p /requirements
# Copy specific files from the requirements directory to the "requirements" directory in the Docker image
COPY requirements/requirements.txt /requirements/requirements.txt
COPY requirements/system_requirements.txt /requirements/system_requirements.txt
COPY requirements/ros_requirements.txt /requirements/ros_requirements.txt
COPY requirements/ros_repository_requirements.txt /requirements/ros_repository_requirements.txt
# Install dependencies for system
RUN apt-get update && apt-get install -y --no-install-recommends <system_requirements.txt \
&& apt-get upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install python 3.8 and make primary
RUN apt-get update && apt-get install -y \
python3.8 python3.8-dev python3-pip python3.8-venv \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
# Pip install update
RUN pip3 install --upgrade pip
# Install python libraries
RUN pip --no-cache-dir install -r requirements.txt
# Install dependencies for ros system
RUN apt-get update && apt-get install -y --no-install-recommends <ros_requirements.txt \
&& rm -rf /var/lib/apt/lists/*
# Create local catkin workspace
RUN mkdir -p $CATKIN_WS/src RUN mkdir -p $CATKIN_WS/src
WORKDIR $CATKIN_WS/src COPY ../ ${CATKIN_WS}/src
WORKDIR $CATKIN_WS
# Set the working directory for catkin
# Initialize catkin workspace
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash" \
&& catkin init \
&& catkin config --cmake-args -DCATKIN_ENABLE_TESTING=0
# Initialize local catkin workspace, install dependencies and build workpsace # Initialize local catkin workspace, install dependencies and build workpsace
RUN echo "source /opt/ros/${ROS_VERSION}/setup.bash" >> ~/.bashrc RUN echo "source /opt/ros/${ROS_VERSION}/setup.bash" >> ~/.bashrc \
RUN source ~/.bashrc && source ~/.bashrc
RUN cd $CATKIN_WS \ RUN cd $CATKIN_WS \
&& rosdep init \
&& rosdep update \ && rosdep update \
&& rosdep update --rosdistro ${ROS_VERSION} \
&& rosdep fix-permissions \ && rosdep fix-permissions \
&& rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_VERSION} && rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_VERSION}
@ -92,5 +58,6 @@ COPY ../scripts/colcon_setup.sh /usr/local/bin/colcon_setup.sh
RUN echo "source /usr/local/bin/colcon_setup.sh" >> /root/.bashrc RUN echo "source /usr/local/bin/colcon_setup.sh" >> /root/.bashrc
RUN chmod +x /usr/local/bin/colcon_setup.sh RUN chmod +x /usr/local/bin/colcon_setup.sh
ENTRYPOINT ["/usr/local/bin/colcon_setup.sh"] # Run the packages and source
CMD ["bash"] RUN /usr/local/bin/colcon_setup.sh
CMD ["/bin/bash"]

View File

@ -19,4 +19,4 @@
catkin build catkin build
# Source workspace setup file # Source workspace setup file
source devel/setup.bash source /opt/ros/overlay_ws/devel/setup.bash