Skip to content

Caching consolidation#43

Open
slamotte wants to merge 10 commits intoomacom-io:mainfrom
slamotte:caching-enhancements
Open

Caching consolidation#43
slamotte wants to merge 10 commits intoomacom-io:mainfrom
slamotte:caching-enhancements

Conversation

@slamotte
Copy link
Copy Markdown

Rather than cache some things in /var/cache and others in ~/.cache, consolidate everything into one master cache directory. Plus make this location configurable with an env var if you want to override the default.

Also, delete previous days' cache folders since they won't be used anymore (they're each > 5GB)

DOCKER_ARGS=(
--rm
--privileged
--platform linux/amd64 # Suppress warnings if building on Apple Silicon
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid the annoying message (I'm still building stuff on my Mac)

# using a dated dir on the host to refresh daily if building multiple times
BUILD_DATE=$(date +%Y-%m-%d)
OFFLINE_REPO_BUILD_CACHE_DIR="$HOME/.cache/omarchy/iso_${BUILD_DATE}/airootfs/var/cache/omarchy"
OMARCHY_CACHE_DIR="${OMARCHY_CACHE_DIR:-$HOME/.cache/omarchy}"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a sensible default location that can be overridden with an env var.

@slamotte slamotte marked this pull request as ready for review September 22, 2025 06:47
--rm
--privileged
--platform linux/amd64 # Suppress warnings if building on Apple Silicon
--ulimit nofile=8192:8192 # Prevent "Too many open files in system" errors during build
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started getting an error "Too many open files in system" during builds, so this fixes that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant