mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-22 21:28:12 +02:00
feat(docker): integrate HF_TOKEN secret into Docker build process
- Added support for HF_TOKEN as a secret in the Docker build workflow to enhance security during model embedding retrieval. - Updated the Dockerfile to utilize the HF_TOKEN secret for fetching embeddings, ensuring sensitive information is handled securely.
This commit is contained in:
parent
6ebee03931
commit
b254ef32e2
2 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
# syntax=docker.io/docker/dockerfile:1
|
||||
# =============================================================================
|
||||
# SurfSense Backend — Multi-stage Dockerfile
|
||||
# =============================================================================
|
||||
|
|
@ -104,7 +105,9 @@ RUN printf '%s\n' \
|
|||
| python || true
|
||||
|
||||
ARG EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
|
||||
RUN python -c "from chonkie import AutoEmbeddings; AutoEmbeddings.get_embeddings('${EMBEDDING_MODEL}')"
|
||||
RUN --mount=type=secret,id=HF_TOKEN \
|
||||
HF_TOKEN="$(cat /run/secrets/HF_TOKEN 2>/dev/null || true)" \
|
||||
python -c "from chonkie import AutoEmbeddings; AutoEmbeddings.get_embeddings('${EMBEDDING_MODEL}')"
|
||||
|
||||
# Install Playwright browsers (the playwright python package itself is in deps)
|
||||
RUN playwright install chromium --with-deps
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue