-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
111 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM ghcr.io/bounverif/autoware:latest-builder-with-cache AS autoware-devel | ||
|
||
RUN wget -qO- "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" | gpg --dearmour -o /usr/share/keyrings/ansible-archive-keyring.gpg && \ | ||
echo "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu jammy main" | tee /etc/apt/sources.list.d/ansible.listd | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update && apt-get install -qy --no-install-recommends \ | ||
ansible-core \ | ||
ansible \ | ||
&& apt-get autoremove -y && rm -rf /var/lib/apt/lists/* | ||
|
||
USER bounverif | ||
WORKDIR /home/bounverif | ||
|
||
ENV AUTOWARE_VERSION=devel | ||
ENV AUTOWARE_SOURCE_DIR=/home/bounverif/autoware/src | ||
ENV AUTOWARE_BUILD_DIR=/tmp/build/autoware | ||
ENV AUTOWARE_INSTALL_DIR=/home/bounverif/autoware/install | ||
|
||
ENV AUTOWARE_REPOSITORY_URL=https://github.com/autowarefoundation/autoware.git | ||
ENV AUTOWARE_CORE_REPOSITORY_URL=https://github.com/autowarefoundation/autoware.core.git | ||
ENV AUTOWARE_UNIVERSE_REPOSITORY_URL=https://github.com/autowarefoundation/autoware.universe.git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
FROM ghcr.io/bounverif/autoware:latest-builder-with-cache AS autoware-prebuilt | ||
|
||
COPY autoware.repos.yml /var/lib/autoware/autoware.repos.yml | ||
|
||
RUN mkdir -p ${AUTOWARE_SOURCE_DIR} \ | ||
&& vcs import --shallow ${AUTOWARE_SOURCE_DIR} < /var/lib/autoware/autoware.repos.yml && \ | ||
ccache --zero-stats && \ | ||
. /opt/ros/humble/setup.sh && \ | ||
colcon --log-base /dev/null build \ | ||
--base-paths ${AUTOWARE_SOURCE_DIR} \ | ||
--build-base ${AUTOWARE_BUILD_DIR} \ | ||
--install-base ${AUTOWARE_INSTALL_DIR} \ | ||
--packages-up-to autoware_launch \ | ||
--event-handlers \ | ||
console_direct- \ | ||
console_stderr+ \ | ||
console_cohesion- \ | ||
console_start_end- \ | ||
console_package_list- \ | ||
status- \ | ||
summary+ \ | ||
desktop_notification- \ | ||
--cmake-args \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
" -Wno-dev" \ | ||
" --no-warn-unused-cli" \ | ||
&& rm -rf ${AUTOWARE_SOURCE_DIR} \ | ||
&& rm -rf ${AUTOWARE_BUILD_DIR} \ | ||
&& ccache -v --show-stats | ||
|
||
FROM docker.io/library/ubuntu:22.04 AS autoware-runtime-base | ||
|
||
# Metadata | ||
LABEL org.opencontainers.image.vendor="tr.edu.bogazici.cmpe.bounverif" | ||
LABEL org.opencontainers.image.version="0.1.0" | ||
LABEL org.opencontainers.image.authors="Bogazici University System Verification Group" | ||
LABEL org.opencontainers.image.source="https://github.com/bounverif/autoware" | ||
LABEL org.opencontainers.image.title="Autoware Runtime" | ||
|
||
# User management | ||
ARG USER=bounverif | ||
ARG USERGROUP=${USER} | ||
ARG UID=1000 | ||
ARG GID=${UID} | ||
|
||
# CUDA variables | ||
ARG CUDA_ARCH=x86_64 | ||
ARG CUDA_DISTRO=ubuntu2204 | ||
ARG CUDA_KEYRING_PACKAGE=cuda-keyring_1.1-1_all.deb | ||
ARG CUDA_KEYRING_FILEPATH=https://developer.download.nvidia.com/compute/cuda/repos/${CUDA_DISTRO}/${CUDA_ARCH}/${CUDA_KEYRING_PACKAGE} | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update && \ | ||
apt-get install -qy --no-install-recommends \ | ||
sudo \ | ||
tini \ | ||
wget \ | ||
gnupg2 \ | ||
ca-certificates \ | ||
&& apt-get autoremove -y && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN groupadd ${USERGROUP} -g ${GID} && \ | ||
useradd -ms /bin/bash ${USER} -g ${USERGROUP} -u ${UID} && \ | ||
printf "${USER} ALL= NOPASSWD: ALL\\n" >> /etc/sudoers | ||
|
||
# Repository management | ||
RUN wget -qO- "https://raw.githubusercontent.com/ros/rosdistro/master/ros.key" | gpg --dearmour -o /usr/share/keyrings/ros-archive-keyring.gpg && \ | ||
echo "deb [signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu jammy main" > /etc/apt/sources.list.d/ros2.list && \ | ||
wget -q ${CUDA_KEYRING_FILEPATH} && dpkg -i ${CUDA_KEYRING_PACKAGE} && rm ${CUDA_KEYRING_PACKAGE} | ||
|
||
FROM autoware-runtime-base AS autoware-runtime | ||
|
||
# This is not complete. It is just a placeholder for the final image. | ||
|
||
COPY --from=autoware-prebuilt ${AUTOWARE_INSTALL_DIR} ${AUTOWARE_INSTALL_DIR} | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${CACHEMOUNT_PREFIX}/var/cache/apt \ | ||
export DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update && apt-get install -y --no-install-recommends \ | ||
libcublas-12-4 \ | ||
libcurand-12-4 \ | ||
&& apt-get autoremove -y && rm -rf /var/lib/apt/lists/* | ||
|
||
ENV NVIDIA_VISIBLE_DEVICES=all | ||
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics |