forked from tier4/scenario_simulator_v2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.arm64
53 lines (42 loc) · 2.25 KB
/
Dockerfile.arm64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
ARG ROS_DISTRO="humble"
# cspell: ignore impactaky deno BUILDPLATFORM TARGETARCH
FROM --platform=${BUILDPLATFORM} impactaky/mc-ubuntu22.04-${TARGETARCH}-host:2.1.0 AS mimic-host
FROM ros:${ROS_DISTRO} as build-stage
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NOWARNINGS=yes
COPY --from=mimic-host / /mimic-cross
RUN /mimic-cross/mimic-cross.deno/setup.sh
RUN --mount=type=cache,id=apt-cache-arm64,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lib-arm64,target=/var/lib/apt,sharing=locked \
sudo apt-get update && sudo apt-get -y install python3-pip python3-rospkg python3-rosdep software-properties-common ccache
# cspell: ignore kisak
RUN --mount=type=cache,id=apt-cache-arm64,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lib-arm64,target=/var/lib/apt,sharing=locked \
add-apt-repository ppa:kisak/kisak-mesa -y
RUN --mount=type=cache,id=apt-cache-arm64,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lib-arm64,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install libegl-mesa0 -y
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
WORKDIR /home/ubuntu/Desktop/scenario_simulator_ws/src/scenario_simulator
COPY . $WORKDIR
WORKDIR /home/ubuntu/Desktop/scenario_simulator_ws/
RUN mkdir -p /home/ubuntu/Desktop/scenario_simulator_ws/src/scenario_simulator/external
WORKDIR /home/ubuntu/Desktop/scenario_simulator_ws/src/scenario_simulator
RUN vcs import external < dependency_${ROS_DISTRO}.repos
WORKDIR /home/ubuntu/Desktop/scenario_simulator_ws/src
RUN --mount=type=cache,id=apt-cache-arm64,target=/var/cache/apt,sharing=locked \
--mount=type=cache,id=apt-lib-arm64,target=/var/lib/apt,sharing=locked \
source /opt/ros/${ROS_DISTRO}/setup.bash \
&& apt-get update \
&& rosdep install -iy --from-paths . --rosdistro ${ROS_DISTRO}
WORKDIR /home/ubuntu/Desktop/scenario_simulator_ws
RUN source /opt/ros/${ROS_DISTRO}/setup.bash && \
colcon build --symlink-install \
--cmake-args \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_CPP_MOCK_SCENARIOS=ON
COPY ./docker-entrypoint.sh /
RUN chmod a+x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]