chmielvu/fastembed-snowflake
FastEmbed Embedding API (Docker SDK, cpu-basic)
Mirror of the Contabo VPS deployment at /srv/stacks/fastembed-snowflake/app.py, running on HF Spaces cpu-basic (2 vCPU / 16 GB). Default model is snowflake/snowflake-arctic-embed-s (FastEmbed ONNX, 384-dim) — same as the live VPS systemd unit. Override via the FASTEMBED_MODEL Space env var if you need a different FastEmbed ONNX model.
Endpoints
Configured env vars (Space)
Quick test
# Public Space — no token needed for embed/info
curl -s https://chmielvu-fastembed-snowflake.hf.space/info | jq
curl -s -X POST https://chmielvu-fastembed-snowflake.hf.space/embed \
-H 'content-type: application/json' \
-d '{"texts": ["hello world", "goodnight moon"]}' | jq '.dimension, .embeddings | length'
# OpenAI-compatible
curl -s -X POST https://chmielvu-fastembed-snowflake.hf.space/v1/embeddings \
-H 'content-type: application/json' \
-d '{"input": "goodnight moon"}' | jq '.data[0].embedding | length'Persistent cache
FASTEMBED_CACHE_PATH=/data — mount a Space volume (hf spaces volumes set chmielvu/fastembed-snowflake -v hf://buckets/<owner>/<bucket>:/data) to keep the ONNX weights warm across restarts. Cold start without the volume is ~25 s on cpu-basic.
Local run
docker build -t fastembed-snowflake .
docker run --rm -p 7860:7860 fastembed-snowflake
curl -s http://localhost:7860/healthSource
Authored locally at C:/Users/Jan/Documents/GitHub/1Agents1/.CLI/cloud_services/HF/fastembed-snowflake/ and pushed to this Space. The original Contabo-VPS source lives at /srv/stacks/fastembed-snowflake/app.py — keep them in sync; the HF copy is a verbatim port of the VPS code with three small additions called out at the top of app.py.
