Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +0 -18
Dockerfile
CHANGED
|
@@ -23,24 +23,6 @@ COPY --chown=user requirements.txt .
|
|
| 23 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 24 |
pip install --no-cache-dir -r requirements.txt
|
| 25 |
|
| 26 |
-
# Pre-download the gated embedding model to avoid first-request latency.
|
| 27 |
-
# Requires a Hugging Face token supplied at build-time via --build-arg HF_TOKEN=...
|
| 28 |
-
ARG HF_TOKEN
|
| 29 |
-
RUN if [ -z "$HF_TOKEN" ]; then \
|
| 30 |
-
echo "HF_TOKEN build arg missing. Supply --build-arg HF_TOKEN=hf_xxx when building." >&2; \
|
| 31 |
-
exit 1; \
|
| 32 |
-
fi && \
|
| 33 |
-
HF_TOKEN="$HF_TOKEN" python - <<'PY'
|
| 34 |
-
import os
|
| 35 |
-
from sentence_transformers import SentenceTransformer
|
| 36 |
-
|
| 37 |
-
token = os.environ.get("HF_TOKEN")
|
| 38 |
-
if not token:
|
| 39 |
-
raise SystemExit("HF_TOKEN environment variable missing during build")
|
| 40 |
-
|
| 41 |
-
SentenceTransformer("google/embeddinggemma-300m", use_auth_token=token)
|
| 42 |
-
PY
|
| 43 |
-
|
| 44 |
# Copy the rest of the application code
|
| 45 |
COPY --chown=user . .
|
| 46 |
|
|
|
|
| 23 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 24 |
pip install --no-cache-dir -r requirements.txt
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
# Copy the rest of the application code
|
| 27 |
COPY --chown=user . .
|
| 28 |
|