Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -0
Dockerfile
CHANGED
|
@@ -23,6 +23,10 @@ COPY src/ ./src/
|
|
| 23 |
RUN pip3 install -r requirements.txt
|
| 24 |
RUN python3 -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('setu4993/LaBSE')"
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
EXPOSE 8501
|
| 27 |
|
| 28 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
|
|
|
| 23 |
RUN pip3 install -r requirements.txt
|
| 24 |
RUN python3 -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('setu4993/LaBSE')"
|
| 25 |
|
| 26 |
+
# Download the model at build time (preload it into cache)
|
| 27 |
+
RUN python3 -c "from transformers import pipeline; pipeline('question-answering', model='deepset/xlm-roberta-base-squad2')"
|
| 28 |
+
|
| 29 |
+
|
| 30 |
EXPOSE 8501
|
| 31 |
|
| 32 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|