Add ccache and CPM cache in ubuntu22 image builds

This commit is contained in:
Bartosz Podrygajlo
2025-05-29 13:48:01 +02:00
parent bab05384a4
commit 171f1fc015
2 changed files with 11 additions and 2 deletions
+1
View File
@@ -40,6 +40,7 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
#gcc needed for build_oai
build-essential \
ccache \
psmisc \
git \
#use gcc-12 to avoid problems of default gcc-11 in FlexRIC
+10 -2
View File
@@ -36,7 +36,12 @@ WORKDIR /oai-ran
COPY . .
# build all targets so final targets can be created afterwards
RUN /bin/sh oaienv && \
RUN \
# Mount CCache cache direrctory
--mount=type=cache,target=/root/.cache/ccache/ \
# Mount CPM package cache
--mount=type=cache,target=/root/.cache/cpm/ \
/bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -c --ninja \
@@ -54,7 +59,10 @@ RUN /bin/sh oaienv && \
ldd ran_build/build/*.so
## Build FlexRIC for SM Models
RUN mkdir -p openair2/E2AP/flexric/build && \
RUN \
# Mount CCache cache direrctory
--mount=type=cache,target=/root/.cache/ccache/ \
mkdir -p openair2/E2AP/flexric/build && \
cd openair2/E2AP/flexric/build && \
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DXAPP_MULTILANGUAGE=OFF \