Spaces:
Sleeping
Sleeping
Commit
·
897c408
1
Parent(s):
5395cd1
Revert to Whisper lazy loading - build OOM persists even with /data. First request downloads to persistent storage.
Browse files- Dockerfile +5 -9
Dockerfile
CHANGED
|
@@ -37,15 +37,11 @@ RUN python -c "from transformers import AutoTokenizer, AutoModelForSequenceClass
|
|
| 37 |
AutoModelForSequenceClassification.from_pretrained('Cyberlace/swara-structure-model', cache_dir='/.cache'); \
|
| 38 |
print('✅ Structure Model cached!')" && chmod -R 777 /.cache
|
| 39 |
|
| 40 |
-
# 2.
|
| 41 |
-
#
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
print('📥 Downloading Whisper medium to persistent storage...'); \
|
| 46 |
-
whisper.load_model('medium', download_root='/data/.cache'); \
|
| 47 |
-
print('✅ Whisper medium cached!')" && \
|
| 48 |
-
chmod -R 777 /data/.cache
|
| 49 |
|
| 50 |
# 3. Download Sentence Transformer for Keywords (~420MB)
|
| 51 |
RUN python -c "from sentence_transformers import SentenceTransformer; \
|
|
|
|
| 37 |
AutoModelForSequenceClassification.from_pretrained('Cyberlace/swara-structure-model', cache_dir='/.cache'); \
|
| 38 |
print('✅ Structure Model cached!')" && chmod -R 777 /.cache
|
| 39 |
|
| 40 |
+
# 2. Whisper medium: LAZY LOADING on first request
|
| 41 |
+
# Build OOM - HF Space build container has RAM limit
|
| 42 |
+
# Will download to /data/.cache on FIRST REQUEST (~2-3 min)
|
| 43 |
+
# With HF Pro persistent storage, download persists across restarts
|
| 44 |
+
# Subsequent requests will be fast using cached model
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
# 3. Download Sentence Transformer for Keywords (~420MB)
|
| 47 |
RUN python -c "from sentence_transformers import SentenceTransformer; \
|