Osama-Ahmed-27 commited on
Commit
2bfe333
·
verified ·
1 Parent(s): f338c6a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # 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"]
 
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"]