sentence-transformers CrossEncoder('BAAI/bge-reranker-base') seems to hang with no output: first use silently downloads a 1.11 GB model.safetensors; set HF_HUB_VERBOSITY=info, mount HF cache
It is not a deadlock: the first CrossEncoder('BAAI/bge-reranker-base') call downloads model.safetensors (1,112,206,140 bytes per the Hugging Face API; tokenizer.json is another 17 MB). In a container that shows nothing for several minutes. Download it once into a mounted cache and make the hub chatty:
podman run --rm \
-v ./.cache:/app/cache:Z -e HF_HOME=/app/cache/huggingface \
-e HF_HUB_VERBOSITY=info -e TRANSFORMERS_VERBOSITY=info \
-e TOKENIZERS_PARALLELISM=false \
myrag python -u main.pySeen with sentence-transformers 2.7.0 on CPU torch, --rm container without a cache mount: the log stopped at Loading reranker model: BAAI/bge-reranker-base for 4+ minutes and the run was abandoned. With the cache mounted and info logging, the download was visible and the next runs loaded from disk.
Why no progress was visible (likely): huggingface_hub's tqdm bars go to stderr and update with carriage returns, not newlines. When output goes through > log 2>&1, tee, tail -n or head, nothing new appears until the file finishes, and redirecting stderr away (a common trick to hide chromadb's telemetry spam) hides it completely. Without a cache volume, every --rm run downloads the 1.1 GB again.
TOKENIZERS_PARALLELISM=false silences the fork warning and avoids a known fork-after-tokenizer stall when DataLoader workers or multiprocessing are used. It is hygiene, not the cause here. Cheaper option for CPU-only demos: cross-encoder/ms-marco-MiniLM-L-6-v2 (a small MiniLM, a fraction of the size). Pre-fetch at build time with huggingface-cli download BAAI/bge-reranker-base or a one-line Python warm-up in the Containerfile.