gabrielchua commited on
Commit
e2911e0
·
verified ·
1 Parent(s): 2783dfd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -1,5 +1,7 @@
1
  FROM python:3.11-slim
2
 
 
 
3
  # Install build dependencies for packages such as uvicorn[standard]
4
  RUN apt-get update && \
5
  apt-get install -y --no-install-recommends build-essential git && \
@@ -24,7 +26,8 @@ RUN pip install --no-cache-dir --upgrade pip && \
24
  pip install --no-cache-dir -r requirements.txt
25
 
26
  # Pre-download the SentenceTransformer embedding model to avoid runtime cold-starts
27
- RUN python - <<'PY'
 
28
  from sentence_transformers import SentenceTransformer
29
 
30
  SentenceTransformer("google/embeddinggemma-300m")
 
1
  FROM python:3.11-slim
2
 
3
+ ARG HF_TOKEN
4
+
5
  # Install build dependencies for packages such as uvicorn[standard]
6
  RUN apt-get update && \
7
  apt-get install -y --no-install-recommends build-essential git && \
 
26
  pip install --no-cache-dir -r requirements.txt
27
 
28
  # Pre-download the SentenceTransformer embedding model to avoid runtime cold-starts
29
+ RUN HF_TOKEN=$HF_TOKEN HUGGINGFACEHUB_API_TOKEN=$HF_TOKEN HUGGINGFACE_HUB_TOKEN=$HF_TOKEN \
30
+ python - <<'PY'
31
  from sentence_transformers import SentenceTransformer
32
 
33
  SentenceTransformer("google/embeddinggemma-300m")