📝 Checkpoint-for-Gemini-2026-08-30.md

Checkpoint-for-Gemini (2026-08-30) — CLIP Proof-of-Concept SUCCESS + Live Migration Planning

Status: Full pipeline (torch → open_clip → real image/video search) proven working end-to-end on Clone. Now planning migration to Live. Swap/swappiness tuning on Live done as prep. Rust/BLIP explored and explicitly parked. Migration itself not yet started.


What happened after your last checkpoint (torch import success)

You already know torch.__version__1.10.0a0+git71f889c worked. Since then:

open_clip installed and validated for real

Hit the Rust-toolchain wall repeatedly (safetensors, hf-xet via huggingface-hub, later tokenizers for transformers/BLIP) — no Rust compiler on this box, and rustup's prebuilt binary needs glibc 2.17+ which this base CentOS 6 system doesn't have. Worked around every Rust dependency by pinning older package versions or using --no-deps + manual selective installs:

Pillow — separate FreeType version wall, worked around

_imagingft.c (Pillow's optional font-rendering module) failed compiling against this CentOS 6 box's ancient system FreeType — needs FreeType 2.5+ constants (FT_LOAD_COLOR, FT_PIXEL_MODE_BGRA) for color-emoji/bitmap font support, unrelated to basic image decode/resize. Fixed with PILLOW_DISABLE_FREETYPE=1 pip install "Pillow<10".

Real end-to-end validation — the actual proof of concept

model, _, preprocess = open_clip.create_model_and_transforms('ViT-B-32', pretrained='openai')
tokenizer = open_clip.get_tokenizer('ViT-B-32')

Real OpenAI CLIP checkpoint downloaded successfully — confirms Clone has genuine outbound internet access (unlike an earlier sandboxed dev environment that blocked huggingface.co/openaipublic.azureedge.net).

Tested against 5 real photos (unlabeled, no predefined categories) with free-text queries. Result on the query "bag of pills" against a photo of bagged tablets: 96.65% confidence, correctly and heavily favoring "pills" over dog/syringe/landscape distractors. Repeated successfully on a second, visually distinct real image (99.74%).

Corrected the initial (wrong) mental model along the way: CLIP does NOT caption/describe images freely — it only ranks similarity between an image and text YOU provide. The real ISEmedia design (confirmed correct, not changed): embed every image once at index time with no labels, embed the user's free-text search query at search time, rank by similarity. This is what was actually validated, not a fixed-category classifier.

ffmpeg compiled from source, video frame extraction proven

No ffmpeg on this box (dropped from CentOS repos years ago for licensing). A static prebuilt binary failed with FATAL: kernel too old (needs newer kernel syscalls than this CentOS 6 box's actual kernel provides) — same class of issue as the Rust/glibc wall. Compiled ffmpeg 4.4.5 from source instead (--disable-x86asm --enable-gpl --disable-doc, devtoolset-7) — worked cleanly, much faster than the PyTorch build. (One red herring along the way: a stale copy of the failed static binary was still shadowing the working compiled one via $PATH order — wasted a few minutes before spotting it.)

Extracted a real frame from a real Instagram-format mp4 (h264/aac, 720x1280, 89s), fed it into the same embedding/search pipeline as the photos — full pipeline now proven for both images AND video.

BLIP / free-text captioning — explored, explicitly parked

Andrew wanted true "just tell me what's in it" captioning with zero predefined labels. That needs a genuinely different model (BLIP/BLIP-2), which needs transformers, which needs tokenizers — Rust again, same wall as safetensors. Tried installing rustup directly to solve the Rust gap once and for all: failedrustup-init's prebuilt binary needs glibc 2.14+ through 2.17+ (multiple missing symbols reported), and this base CentOS 6 system's glibc predates all of them. Building Rust from source was assessed as its own bootstrap nightmare (rustc needs an existing Rust binary to compile itself) — comparable to or harder than tonight's whole PyTorch saga, for a "nice to have" feature.

Decision: BLIP is parked. The core, actually-required ISEmedia feature (similarity search, no captioning needed) is fully proven and working. BLIP/Rust is flagged as a future project — likely worth revisiting only alongside a base-OS upgrade (e.g. as part of Andrew's floated idea of migrating to a dedicated VMware ESXi host on newer hardware/OS), not worth chasing further on stock CentOS 6.

Currently in progress: Live migration planning

Decision made: since Clone has now fully proven this works, migrate the same setup (torch + open_clip + ffmpeg) onto Live — the actual production box — rather than leaving this only on the disposable test VM. Standing safety rule for anything touching Live: image Live first, and any live-server change happens with a pre-change rollback point available. Andrew's real backup window is 2-6pm AEST (usually done by 2:30pm) — but this specific work was judged "safe enough to do now" since it's purely additive (new software installs, no touching the forum's existing code/DB), not the kind of destructive/structural change the backup-window caution is really protecting against.

Environment comparison confirmed (Clone vs Live)

Swap/swappiness tuning done on Live as prep (this session)

Not yet done (next actual steps)

  1. Confirm swap/swappiness changes are persisted (fstab + sysctl.conf)
  2. Image Live (the actual rollback point) before copying any PyTorch/ffmpeg artifacts onto it
  3. Copy or rebuild the working torch/open_clip/ffmpeg install onto Live
  4. Run the same validation tests directly on Live (import torch, real image encode, real ffmpeg frame extraction) — with particular attention to memory behavior given the 2GB constraint
  5. Only after that's proven stable: wire real embeddings into MediaIndexer.py/MediaSearch.py's existing SimilarityRule scoring (built and tested against mock data months ago, never yet fed real embeddings)