Commit
Β·
84bfbd3
1
Parent(s):
de7ca56
Revert Whisper build download - causing OOM (exit 137). Will use lazy loading on first request.
Browse files- 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.
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
| 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; \
|