Spaces:
Sleeping
Sleeping
fix: download models at startup to always use latest version
Browse files- Dockerfile +2 -4
Dockerfile
CHANGED
|
@@ -17,9 +17,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 17 |
|
| 18 |
COPY --chown=user . /app
|
| 19 |
|
| 20 |
-
# Download k-mer models from HF Hub at build time
|
| 21 |
-
RUN python -c "from huggingface_hub import snapshot_download; snapshot_download('Seyomi/synthguard-kmer', repo_type='model', local_dir='models/synthguard_kmer')"
|
| 22 |
-
|
| 23 |
EXPOSE 7860
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
| 17 |
|
| 18 |
COPY --chown=user . /app
|
| 19 |
|
|
|
|
|
|
|
|
|
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
+
# Download latest models at startup so Space always uses the current HF version
|
| 23 |
+
CMD ["sh", "-c", "python -c \"from huggingface_hub import snapshot_download; snapshot_download('Seyomi/synthguard-kmer', repo_type='model', local_dir='models/synthguard_kmer')\" && uvicorn api:app --host 0.0.0.0 --port 7860"]
|