Skip to content

docs: XDG_CACHE_HOME moves the calibration folder; set it to a mounted path in a container - #57

Merged
Vasyl-Trefilov merged 1 commit into
RustingStudio:mainfrom
FFAX-max:fix/docs-calibration-cache-in-containers
Nov 19, 2026
Merged

Vasyl-Trefilov merged 1 commit into
RustingStudio:mainfrom
FFAX-max:fix/docs-calibration-cache-in-containers

Conversation

@FFAX-max

Copy link
Copy Markdown
Contributor

Refs #52.

What

#52 reports that calibrate writes to $HOME/.cache/rusting_strata, so a docker run --rm container loses the file on exit and the next container runs uncalibrated. The reporter worked around it with -e HOME=/data/cc.

The code already has a narrower way: expert_cache::cache_dir() reads XDG_CACHE_HOME first, and calibration_path in src/main.rs builds on it. The docs only name ~/.cache/rusting_strata, so nobody finds it. This PR documents it in the two places that name the folder:

  • docs/USAGE.md, at --chunk / calibrate: XDG_CACHE_HOME moves the folder; in a container set it to a mounted path.
  • docs/HOSTING.md, after "Run calibrate as the service user": the same for a container, with an example (-v /srv/strata-cache:/cache -e XDG_CACHE_HOME=/cache).

Docs only, no code change. It covers the first of the three fixes suggested in #52 as far as it already exists; a --calibration-out flag and a louder start-up line are left for you to decide, so this does not close the issue.

How I checked

In a rust:latest container, against main at 5675724, a one-line example that prints rusting_strata::expert_cache::cache_dir():

default (HOME=/root):   /root/.cache/rusting_strata
XDG_CACHE_HOME=/cache:  /cache/rusting_strata

I did not run calibrate or serve themselves (no GPU in that container); that they use this folder is from reading calibration_path (src/main.rs) and cache_dir (src/expert_cache.rs).

@aletheore

aletheore Bot commented Nov 19, 2026

Copy link
Copy Markdown

Aletheore Flash review

No issues found in this diff.

@aletheore

aletheore Bot commented Nov 19, 2026

Copy link
Copy Markdown

🔍 Aletheore evidence diff

What changed
Deterministic, computed from this commit's real scan and import graph - posted on every run, whether or not Flash Review found anything.

  • docs/HOSTING.md · modified · +5/-0
  • docs/USAGE.md · modified · +3/-0

Aggregate deltas

  • Modules: +0
  • Dependency graph edges: +0
  • Commits: 1

@Vasyl-Trefilov
Vasyl-Trefilov merged commit a416fc3 into RustingStudio:main Nov 19, 2026
3 checks passed
pberenyi pushed a commit to pberenyi/RustingStrata that referenced this pull request Nov 20, 2026
Co-authored-by: Andrew Pavlov <100561417+andrew-pavlov-ua@users.noreply.github.com>
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.

2 participants