run nltk import stopwords in dockerfile to prevent runtime error
Browse files- Dockerfile +3 -0
Dockerfile
CHANGED
@@ -14,4 +14,7 @@ RUN mkdir /data
|
|
14 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
15 |
# ^ no caching of the packages to save space
|
16 |
|
|
|
|
|
|
|
17 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
14 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
15 |
# ^ no caching of the packages to save space
|
16 |
|
17 |
+
RUN python -c "import nltk; nltk.download('stopwords')"
|
18 |
+
# ^ to fix runtime error, see https://github.com/run-llama/llama_index/issues/10681
|
19 |
+
|
20 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|