gabrielchua commited on
Commit
61e94a3
·
verified ·
1 Parent(s): 58832cd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -5
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  FROM python:3.11-slim
2
 
 
3
  ARG HF_TOKEN
4
 
5
  # Install build dependencies for packages such as uvicorn[standard]
@@ -26,11 +27,8 @@ RUN pip install --no-cache-dir --upgrade pip && \
26
  pip install --no-cache-dir -r requirements.txt
27
 
28
  # Pre-download the SentenceTransformer embedding model to avoid runtime cold-starts
29
- RUN if [ -z "$HF_TOKEN" ]; then \
30
- echo "HF_TOKEN build arg is required to download google/embeddinggemma-300m" >&2; \
31
- exit 1; \
32
- fi && \
33
- HF_TOKEN=$HF_TOKEN python - <<'PY'
34
  import os
35
  from sentence_transformers import SentenceTransformer
36
 
 
1
  FROM python:3.11-slim
2
 
3
+ # Declare your environment variables with the ARG directive
4
  ARG HF_TOKEN
5
 
6
  # Install build dependencies for packages such as uvicorn[standard]
 
27
  pip install --no-cache-dir -r requirements.txt
28
 
29
  # Pre-download the SentenceTransformer embedding model to avoid runtime cold-starts
30
+ # You can use them like environment variables
31
+ RUN python - <<'PY'
 
 
 
32
  import os
33
  from sentence_transformers import SentenceTransformer
34