rohitsar567 Claude Opus 4.7 (1M context) commited on
Commit
0693bf9
·
1 Parent(s): a9718b3

fix(deploy): KI-119 — DATASET_CACHE_BUST arg forces HF dataset re-pull

Browse files

Docker layer cache reused the snapshot_download layer across HF Space
rebuilds because the command string was unchanged. Symptom: even after
uploading a cleaned Chroma to the HF Dataset, the Space served the
prior cached layer's stale 7356-chunk DB. Bump DATASET_CACHE_BUST any
time the dataset content changes; the value just needs to differ from
the previous build's value to invalidate the cache.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +10 -1
Dockerfile CHANGED
@@ -62,7 +62,16 @@ COPY 40-data ./40-data
62
  # ~310 MB and would have made the Space repo unviable on top of the regular
63
  # code. HF datasets get 50 GB free quota — the right place for this data.
64
  # Public dataset, no token needed at build time. See D-019.
65
- RUN python -c "\
 
 
 
 
 
 
 
 
 
66
  from huggingface_hub import snapshot_download; \
67
  snapshot_download(\
68
  repo_id='rohitsar567/insurance-bot-data', \
 
62
  # ~310 MB and would have made the Space repo unviable on top of the regular
63
  # code. HF datasets get 50 GB free quota — the right place for this data.
64
  # Public dataset, no token needed at build time. See D-019.
65
+ #
66
+ # KI-119 (2026-05-15) — CACHE_BUST arg forces this layer to re-execute
67
+ # whenever we update the dataset. Without it, Docker reuses the cached
68
+ # snapshot_download layer (command string unchanged) even though the
69
+ # remote dataset's content changed. Symptom: HF Space served stale Chroma
70
+ # (7356 chunks from a prior ingest) instead of the freshly-uploaded
71
+ # cleaned one (3799 chunks). Bump CACHE_BUST manually each time the
72
+ # dataset is re-uploaded; the value just needs to change.
73
+ ARG DATASET_CACHE_BUST=2026-05-15-ki119-v2
74
+ RUN echo "Dataset cache bust: ${DATASET_CACHE_BUST}" && python -c "\
75
  from huggingface_hub import snapshot_download; \
76
  snapshot_download(\
77
  repo_id='rohitsar567/insurance-bot-data', \