Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Ubuntu <[email protected]>
  • Loading branch information
Ubuntu committed Dec 5, 2024
1 parent ac5d6c4 commit b77dbfd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
23 changes: 11 additions & 12 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG PLATFORM
FROM ghcr.io/autowarefoundation/autoware:universe-devel-20240927 AS aws-reinvent-simulator-devel
FROM ghcr.io/autowarefoundation/autoware:universe-devel AS aws-reinvent-simulator-devel
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ENV CCACHE_DIR="/root/.ccache"
Expand All @@ -20,19 +20,18 @@ RUN source /opt/ros/"$ROS_DISTRO"/setup.bash \
&& colcon build --cmake-args \
" -Wno-dev" \
" --no-warn-unused-cli" \
--install-base /opt/autoware \
--merge-install \
--mixin release compile-commands ccache \
--base-paths /autoware/src/simulator

RUN find /opt/autoware/lib -type f -name "*.py" -exec chmod +x {} \;
RUN find /opt/autoware/share -type f -name "*.py" -exec chmod +x {} \;
RUN find /autoware/install/lib -type f -name "*.py" -exec chmod +x {} \;
RUN find /autoware/install/share -type f -name "*.py" -exec chmod +x {} \;

FROM ghcr.io/autowarefoundation/autoware:universe-20240927 AS aws-reinvent-simulator
FROM ghcr.io/autowarefoundation/autoware:universe AS aws-reinvent-simulator

# Copy simulator from simulator-devel
COPY src /autoware/src
COPY --from=aws-reinvent-simulator-devel /opt/autoware /opt/autoware
COPY --from=aws-reinvent-simulator-devel /autoware/install /autoware/install

# Set up rosdep
RUN --mount=type=ssh \
Expand All @@ -44,18 +43,18 @@ RUN --mount=type=ssh \
&& rosdep install -y --from-paths src --ignore-src --dependency-types=exec --rosdistro $ROS_DISTRO \
&& apt-get autoremove -y && rm -rf "$HOME"/.cache

RUN echo "source /opt/autoware/setup.bash" > /etc/bash.bashrc
RUN echo "source /autoware/install/setup.bash" > /etc/bash.bashrc

# Copy simulation scenario and map
COPY docker/etc/simulation /autoware/scenario-sim

# Create entrypoint
COPY docker/etc/aws_entrypoint.sh /aws_entrypoint.sh
RUN chmod +x /aws_entrypoint.sh
ENTRYPOINT ["/aws_entrypoint.sh"]
CMD ["/bin/bash"]
# COPY docker/etc/aws_entrypoint.sh /aws_entrypoint.sh
# RUN chmod +x /aws_entrypoint.sh
# ENTRYPOINT ["/aws_entrypoint.sh"]
# CMD ["/bin/bash"]

FROM ghcr.io/autowarefoundation/autoware:universe-20240927 AS aws-reinvent-planning-control
FROM ghcr.io/autowarefoundation/autoware:universe AS aws-reinvent-planning-control

RUN --mount=type=ssh \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
Expand Down
4 changes: 2 additions & 2 deletions docker/etc/aws_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi
# Run the launch command
echo "Running: $@"
source "/opt/ros/$ROS_DISTRO/setup.bash"
source /opt/autoware/setup.bash
source /autoware/install/setup.bash
"$@" &
ros_pid=$!

Expand All @@ -36,7 +36,7 @@ uploadToS3() {
echo "S3 object key: $S3_OBJECT_KEY"
# Trim leading/trailing spaces from S3_BUCKET
S3_BUCKET=$(echo "$S3_BUCKET" | xargs)

FULL_S3_PATH="s3://${S3_BUCKET}/${S3_OBJECT_KEY}"
echo "Full S3 path: $FULL_S3_PATH"

Expand Down

0 comments on commit b77dbfd

Please sign in to comment.