rohitsar567 Claude Opus 4.7 (1M context) commited on
Commit
8ff05ba
·
1 Parent(s): 57ef382

fix(deploy): KI-055 — drop rag/vectors symlink from repo (HF Space BUILD_ERROR)

Browse files

Live symptom: HF Space stage = BUILD_ERROR with exit code 1 after the
recent push cascade. Smoke confirmed the symlink was the culprit.

Background: rag/vectors was committed as a Git symlink (file mode 120000)
pointing to ../_hf_dataset_backup/rag/vectors — a local-dev convenience
so backend can read the cloned HF dataset without copying. In the Docker
build context, _hf_dataset_backup/ doesn't exist (it's local-only +
~136 GB and explicitly gitignored), so the symlink is BROKEN inside the
container. When the final stage runs:

RUN useradd -m -u 1000 user && chown -R user:user /app

chown walks the entire /app tree, follows the dangling symlink, and
fails with "no such file or directory" → exit 1 → BUILD_ERROR.

Fix:
• `git rm --cached rag/vectors` — remove the symlink from the repo.
• Add `rag/vectors` to .gitignore so it can't be re-committed.

In production, the Dockerfile's snapshot_download step (line 65-78)
pulls the canonical vectors from the HF dataset directly into
/app/rag/vectors/. So removing the symlink is a no-op for the live
container — that path is recreated as a real directory at build time.

Local dev still works: backend reads through whatever rag/vectors
resolves to at runtime, and developers typically have either the
symlink pointing at _hf_dataset_backup/rag/vectors or a real directory
from running the snapshot_download script locally.

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

Files changed (2) hide show
  1. .gitignore +1 -0
  2. rag/vectors +0 -1
.gitignore CHANGED
@@ -89,3 +89,4 @@ README.pdf
89
  80-audit/full_*/
90
  80-audit/postfix_*/
91
  MUST_FIX.md
 
 
89
  80-audit/full_*/
90
  80-audit/postfix_*/
91
  MUST_FIX.md
92
+ rag/vectors
rag/vectors DELETED
@@ -1 +0,0 @@
1
- /Users/rohitsar/Developer/Insurance Sales Bot/rag/_hf_dataset_backup/rag/vectors