Selaa lähdekoodia

docker: pre-download transformer weights

Timothy J. Baek 1 vuosi sitten
vanhempi
commit
31bd6dfc15
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      Dockerfile

+ 1 - 0
Dockerfile

@@ -28,6 +28,7 @@ WORKDIR /app/backend
 
 COPY ./backend/requirements.txt ./requirements.txt
 RUN pip3 install -r requirements.txt
+RUN python -c "from sentence_transformers import SentenceTransformer; model = SentenceTransformer('all-MiniLM-L6-v2')"
 
 COPY ./backend .