Seyomi commited on
Commit
01c73cf
·
verified ·
1 Parent(s): 8c56f71

fix: download models at startup to always use latest version

Browse files
Files changed (1) hide show
  1. 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
- CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
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"]