Skip to content

Commit

Permalink
Adjust cache settings
Browse files Browse the repository at this point in the history
  • Loading branch information
doganulus committed Aug 3, 2024
1 parent 330cc71 commit ae6c9dc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion containers/autoware-devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${TARGETPLATFORM}
ARG AUTOWARE_VERSION
ENV AUTOWARE_DEVEL_VERSION=${AUTOWARE_VERSION:-latest}
RUN echo "AUTOWARE_DEVEL_VERSION=${AUTOWARE_DEVEL_VERSION}" >> /etc/environment

# Build arguments
ARG \
CUDA_ARCH=x86_64 \
Expand Down Expand Up @@ -167,6 +167,7 @@ RUN --mount=type=bind,from=autoware-source,source=${AUTOWARE_SOURCE_DIR},target=
--build-base /tmp/autoware/build \
--install-base /tmp/autoware/install \
--packages-up-to autoware_launch \
--parallel-workers 4 \
--event-handlers \
console_direct- \
console_stderr+ \
Expand Down
13 changes: 7 additions & 6 deletions containers/autoware-runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
ARG IMAGE_NAME=localhost/autoware
ARG AUTOWARE_BUILDER_VERSION=latest
ARG AUTOWARE_DEVEL_VERSION=latest
ARG AUTOWARE_VERSION=latest

FROM ${IMAGE_NAME}:${AUTOWARE_BUILDER_VERSION}-builder-with-cache AS autoware-prebuilt
FROM ${IMAGE_NAME}:${AUTOWARE_DEVEL_VERSION}-builder-with-cache AS autoware-prebuilt
ARG TARGETARCH TARGETOS TARGETPLATFORM TARGETVARIANT

RUN --mount=type=bind,source=etc/autoware/autoware.repos.yml,target=/etc/autoware/autoware.repos.yml set -ex \
; set -ex \
; mkdir -p ${AUTOWARE_SOURCE_DIR} \
; vcs import --shallow ${AUTOWARE_SOURCE_DIR} < /etc/autoware/autoware.repos.yml \
; ccache --get-config base_dir \
; export CCACHE_DEBUG=1 \
; ccache --show-config \
; ccache --zero-stats \
; . /opt/ros/${ROS_DISTRO}/setup.sh \
; colcon --log-base /dev/null build \
Expand All @@ -33,16 +34,16 @@ RUN --mount=type=bind,source=etc/autoware/autoware.repos.yml,target=/etc/autowar
; rm -rf ${AUTOWARE_BUILD_DIR} \
; ccache -v --show-stats

FROM ${IMAGE_NAME}:${AUTOWARE_BUILDER_VERSION}-base AS autoware-runtime
FROM ${IMAGE_NAME}:${AUTOWARE_DEVEL_VERSION}-base AS autoware-runtime
ARG TARGETARCH TARGETOS TARGETPLATFORM TARGETVARIANT

# This is not complete. It is just a placeholder for the final image.

RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=${TARGETPLATFORM}/var/cache/apt set -eux \
; export DEBIAN_FRONTEND=noninteractive \
; apt-get -qq update && apt-get install -qqy --no-install-recommends \
libcublas-12-4 \
libcurand-12-4 \
libcublas-${CUDA_TOOLKIT_VERSION_DASHED} \
libcurand-${CUDA_TOOLKIT_VERSION_DASHED} \
libnvinfer8 \
libnvinfer-plugin8 \
libnvparsers8 \
Expand Down
1 change: 1 addition & 0 deletions etc/ccache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
#
cache_dir=/var/cache/ccache
base_dir=/root
debug_dir = /var/cache/ccache/debug

0 comments on commit ae6c9dc

Please sign in to comment.