diff --git a/.env.example b/.env.example index f248b88..39e0ae2 100644 --- a/.env.example +++ b/.env.example @@ -46,6 +46,14 @@ EMBEDDING_BACKEND=tei TEI_BASE_URL=http://127.0.0.1:8080 TEI_DEVICE=cuda TEI_VERSION=1.9 +# Optional: override TEI docker image repository (useful for mirrors). +# TEI_IMAGE_REPO=ghcr.m.daocloud.io/huggingface/text-embeddings-inference +# +# Optional: pin an explicit TEI image tag. +# - For Tesla T4 (compute capability 7.5), prefer the `turing-*` image tag, e.g.: +# TEI_IMAGE=ghcr.m.daocloud.io/huggingface/text-embeddings-inference:turing-1.9 +# - For Ampere+ GPUs, prefer `cuda-*` image tag, e.g.: +# TEI_IMAGE=ghcr.m.daocloud.io/huggingface/text-embeddings-inference:cuda-1.9 TEI_MAX_BATCH_TOKENS=2048 TEI_MAX_CLIENT_BATCH_SIZE=8 TEI_HEALTH_TIMEOUT_SEC=300 diff --git a/.env.test.example b/.env.test.example new file mode 100644 index 0000000..28ab2da --- /dev/null +++ b/.env.test.example @@ -0,0 +1,40 @@ +# Test environment overrides example (no secrets). +# +# Usage: +# cp .env.example .env +# cat .env.test.example >> .env +# +# Notes: +# - This repo is multi-service; values below focus on local test deployment. +# - Keep real credentials (Redis/MySQL/ES passwords) out of VCS. + +# ===== runtime / namespace ===== +RUNTIME_ENV=test +ES_INDEX_NAMESPACE=test_ + +# ===== Elasticsearch (example: local docker on non-default port) ===== +ES_HOST=http://127.0.0.1:19200 +ES_USERNAME= +ES_PASSWORD= +ES_DOCKER_HTTP_PORT=19200 +ES_DOCKER_CONTAINER_NAME=saas-search-es9-test + +# ===== HuggingFace cache ===== +HF_CACHE_DIR=/data/tw/.cache/huggingface + +# ===== TEI (text embeddings inference) ===== +# Service port exposed by container (host:8080 -> container:80) +TEI_PORT=8080 +# Use GPU when available +TEI_DEVICE=cuda +# Use float16 for performance on GPU +TEI_DTYPE=float16 +# IMPORTANT for Tesla T4 (compute capability 7.5): use turing image tag +TEI_IMAGE=ghcr.m.daocloud.io/huggingface/text-embeddings-inference:turing-1.9 +# Example pinned model snapshot path (update per-machine) +TEI_MODEL_ID=/data/hub/models--BAAI--bge-m3/snapshots/5617a9f61b028005a4858fdac845db406aefb181 +TEI_MAX_BATCH_TOKENS=2048 +TEI_MAX_CLIENT_BATCH_SIZE=8 +TEI_HEALTH_TIMEOUT_SEC=240 +TEI_CONTAINER_NAME=saas-search-tei-test + -- libgit2 0.21.2