Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -28,13 +28,13 @@ COPY README.md .
|
|
| 28 |
ENV PORT=7860
|
| 29 |
|
| 30 |
# (Optional) Pre-download models on build to reduce cold-start
|
| 31 |
-
#
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
|
| 39 |
# Start FastAPI with uvicorn
|
| 40 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 28 |
ENV PORT=7860
|
| 29 |
|
| 30 |
# (Optional) Pre-download models on build to reduce cold-start
|
| 31 |
+
#Comment out if build time becomes too long
|
| 32 |
+
RUN python -c "import nltk; \
|
| 33 |
+
import whisper; \
|
| 34 |
+
from nltk.sentiment.vader import SentimentIntensityAnalyzer as _; \
|
| 35 |
+
import nltk; \
|
| 36 |
+
nltk.download('vader_lexicon'); \
|
| 37 |
+
whisper.load_model('${WHISPER_MODEL}')"
|
| 38 |
|
| 39 |
# Start FastAPI with uvicorn
|
| 40 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|