mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Share ccache volume across checkouts, cap at 2G
The ccache named volume had no explicit name, so Docker Compose namespaced it under the per-checkout project name (derived from UNIQUE_ID), giving each checkout its own cache even though docker/README.md already documented them as shared. Give the volume a fixed name so all checkouts attach the same one. Measured cache size after a full build (IfcParse+IfcGeom+IfcConvert+ wrapper, one Python version) is ~300MB, only ~5% of the previous 5G cap. Shrink CCACHE_MAXSIZE to 2G, which comfortably covers the shared baseline plus per-branch deltas from several diverging checkouts. Generated with the assistance of an AI coding tool.
This commit is contained in:
+4
-1
@@ -28,8 +28,11 @@ RUN git config --system --add safe.directory '*'
|
|||||||
# volume mount point at runtime - anything `ccache -M` writes to a config
|
# volume mount point at runtime - anything `ccache -M` writes to a config
|
||||||
# file under it during this build gets shadowed once the real volume is
|
# file under it during this build gets shadowed once the real volume is
|
||||||
# mounted, so the size cap only actually takes effect via the env var.
|
# mounted, so the size cap only actually takes effect via the env var.
|
||||||
|
# 2G is generous: a full build (IfcParse+IfcGeom+IfcConvert+wrapper, one
|
||||||
|
# Python version) measures ~300MB, and the volume is now shared across all
|
||||||
|
# checkouts (see compose.yaml), so this covers several diverging branches.
|
||||||
ENV CCACHE_DIR=/ccache
|
ENV CCACHE_DIR=/ccache
|
||||||
ENV CCACHE_MAXSIZE=5G
|
ENV CCACHE_MAXSIZE=2G
|
||||||
ENV PATH="/usr/lib/ccache:$PATH"
|
ENV PATH="/usr/lib/ccache:$PATH"
|
||||||
|
|
||||||
# Non-root user matching the host UID/GID that bind-mounts the repo (default
|
# Non-root user matching the host UID/GID that bind-mounts the repo (default
|
||||||
|
|||||||
@@ -12,3 +12,4 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
ccache:
|
ccache:
|
||||||
|
name: ifcopenshell-ccache-shared
|
||||||
|
|||||||
Reference in New Issue
Block a user