Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -0
Dockerfile
CHANGED
|
@@ -11,6 +11,18 @@ RUN apt-get update && apt-get install -y \
|
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
# Copy the app code
|
| 15 |
COPY . .
|
| 16 |
|
|
|
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
+
# Install huggingface hub CLI
|
| 15 |
+
RUN pip install huggingface_hub
|
| 16 |
+
|
| 17 |
+
# Download model files
|
| 18 |
+
RUN python -c "from huggingface_hub import hf_hub_download; \
|
| 19 |
+
import os; \
|
| 20 |
+
MODEL_DIR = 'my_model'; \
|
| 21 |
+
os.makedirs(MODEL_DIR, exist_ok=True); \
|
| 22 |
+
hf_hub_download('MariaKaiser/EGTTS_finetuned', 'config.json', cache_dir=MODEL_DIR); \
|
| 23 |
+
hf_hub_download('MariaKaiser/EGTTS_finetuned', 'vocab.json', cache_dir=MODEL_DIR); \
|
| 24 |
+
hf_hub_download('MariaKaiser/EGTTS_finetuned', 'model.pth', cache_dir=MODEL_DIR)"
|
| 25 |
+
|
| 26 |
# Copy the app code
|
| 27 |
COPY . .
|
| 28 |
|