jobian commited on
Commit
282ba35
·
1 Parent(s): 4b952bd
Files changed (1) hide show
  1. Dockerfile +3 -0
Dockerfile CHANGED
@@ -18,6 +18,9 @@ ENV HF_HUB_CACHE=/tmp/huggingface/hub
18
  RUN pip install --no-cache-dir -r requirements.txt && \
19
  pip install -e ./smoldocling
20
 
 
 
 
21
  EXPOSE 7860
22
 
23
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
18
  RUN pip install --no-cache-dir -r requirements.txt && \
19
  pip install -e ./smoldocling
20
 
21
+ # 🟩 Pre-download model to avoid runtime issues
22
+ RUN python -c "from transformers import AutoModel, AutoTokenizer; AutoTokenizer.from_pretrained('ds4sd/SmolDocling-256M-preview'); AutoModel.from_pretrained('ds4sd/SmolDocling-256M-preview')"
23
+
24
  EXPOSE 7860
25
 
26
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]