Spaces:
Sleeping
Sleeping
Removed predownload on build & extended fastapi timeout instead
Browse files- Dockerfile +1 -8
Dockerfile
CHANGED
|
@@ -51,15 +51,8 @@ ENV NUMBA_DISABLE_JIT=0
|
|
| 51 |
ENV MUSICLIME_NUM_SAMPLES=1000
|
| 52 |
ENV MUSICLIME_NUM_FEATURES=10
|
| 53 |
|
| 54 |
-
# Pre-download models during build
|
| 55 |
-
RUN python3.11 -c "import torch; \
|
| 56 |
-
torch.hub.load_state_dict_from_url('https://zenodo.org/records/5069601/files/vocals-bccbd9aa.pth', model_dir='/app/.cache/torch/hub/checkpoints'); \
|
| 57 |
-
torch.hub.load_state_dict_from_url('https://zenodo.org/records/5069601/files/bass-8d85a5bd.pth', model_dir='/app/.cache/torch/hub/checkpoints'); \
|
| 58 |
-
torch.hub.load_state_dict_from_url('https://zenodo.org/records/5069601/files/drums-9619578f.pth', model_dir='/app/.cache/torch/hub/checkpoints'); \
|
| 59 |
-
torch.hub.load_state_dict_from_url('https://zenodo.org/records/5069601/files/other-b52fbbf7.pth', model_dir='/app/.cache/torch/hub/checkpoints')"
|
| 60 |
-
|
| 61 |
# Hugging Face Spaces specific, expose port 7860
|
| 62 |
EXPOSE 7860
|
| 63 |
|
| 64 |
# Run on port 7860 for HF Spaces
|
| 65 |
-
CMD ["uvicorn", "app.server:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 51 |
ENV MUSICLIME_NUM_SAMPLES=1000
|
| 52 |
ENV MUSICLIME_NUM_FEATURES=10
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
# Hugging Face Spaces specific, expose port 7860
|
| 55 |
EXPOSE 7860
|
| 56 |
|
| 57 |
# Run on port 7860 for HF Spaces
|
| 58 |
+
CMD ["uvicorn", "app.server:app", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "600"]
|