fariedalfarizi commited on
Commit
84bfbd3
Β·
1 Parent(s): de7ca56

Revert Whisper build download - causing OOM (exit 137). Will use lazy loading on first request.

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -35,11 +35,13 @@ RUN python -c "from transformers import AutoTokenizer, AutoModelForSequenceClass
35
  AutoModelForSequenceClassification.from_pretrained('Cyberlace/swara-structure-model', cache_dir='/.cache'); \
36
  print('βœ… Structure Model cached!')" && chmod -R 777 /.cache
37
 
38
- # 2. Download Whisper medium model (~1.5GB) - with memory optimization
39
- RUN python -c "import whisper; \
40
- print('πŸ“₯ Downloading Whisper medium model (1.5GB)...'); \
41
- whisper.load_model('medium', download_root='/.cache'); \
42
- print('βœ… Whisper medium cached!')" && chmod -R 777 /.cache
 
 
43
 
44
  # 3. Download Sentence Transformer for Keywords (~420MB)
45
  RUN python -c "from sentence_transformers import SentenceTransformer; \
 
35
  AutoModelForSequenceClassification.from_pretrained('Cyberlace/swara-structure-model', cache_dir='/.cache'); \
36
  print('βœ… Structure Model cached!')" && chmod -R 777 /.cache
37
 
38
+ # 2. Whisper medium will be downloaded on FIRST REQUEST (lazy loading)
39
+ # Build OOM with 1.5GB download - HF Space has limited build memory
40
+ # First request will take ~2-3 min extra for one-time download
41
+ # RUN python -c "import whisper; \
42
+ # print('πŸ“₯ Downloading Whisper medium model (1.5GB)...'); \
43
+ # whisper.load_model('medium', download_root='/.cache'); \
44
+ # print('βœ… Whisper medium cached!')" && chmod -R 777 /.cache
45
 
46
  # 3. Download Sentence Transformer for Keywords (~420MB)
47
  RUN python -c "from sentence_transformers import SentenceTransformer; \