AnshulS commited on
Commit
3ffdc36
·
verified ·
1 Parent(s): 8f571c2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -0
Dockerfile CHANGED
@@ -6,5 +6,12 @@ COPY . /app
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
  EXPOSE 7860
 
 
 
 
 
 
 
9
 
10
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
  EXPOSE 7860
9
+ ENV HF_HOME=/tmp
10
+ ENV TRANSFORMERS_CACHE=/tmp
11
+ ENV SENTENCE_TRANSFORMERS_HOME=/tmp
12
+
13
+ # Pre-download the sentence-transformers model
14
+ RUN python3 -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
15
+
16
 
17
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]