hetsheta commited on
Commit
84cf6dd
·
1 Parent(s): d741d87

Fix Dockerfile: use preload script instead of inline python -c to avoid IndentationError

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -5
Dockerfile CHANGED
@@ -30,11 +30,8 @@ COPY . .
30
 
31
  # Run a python script to pre-download the ML models to the cache folder during Docker build
32
  # This makes container startup immediate and avoids download timeouts.
33
- RUN python -c " \
34
- from sentence_transformers import SentenceTransformer; \
35
- SentenceTransformer('NeuML/pubmedbert-base-embeddings'); \
36
- SentenceTransformer('cross-encoder/ms-marco-MiniLM-L-6-v2'); \
37
- "
38
 
39
  # Set permissions for the app folder again
40
  RUN chmod -R 777 /app
 
30
 
31
  # Run a python script to pre-download the ML models to the cache folder during Docker build
32
  # This makes container startup immediate and avoids download timeouts.
33
+ COPY scripts/preload_models.py /tmp/preload_models.py
34
+ RUN python /tmp/preload_models.py
 
 
 
35
 
36
  # Set permissions for the app folder again
37
  RUN chmod -R 777 /app