funterpie commited on
Commit
ce89919
·
verified ·
1 Parent(s): d53bf4c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -9,8 +9,11 @@ RUN pip install --no-cache-dir -r requirements.txt
9
  # Copy app files
10
  COPY main.py .
11
  COPY mnist_model.keras .
12
- COPY mnist_model.h5 . # fallback
13
 
 
 
 
 
14
  EXPOSE 7860
15
 
16
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
9
  # Copy app files
10
  COPY main.py .
11
  COPY mnist_model.keras .
 
12
 
13
+ # Optional fallback (if you want .h5 too)
14
+ COPY mnist_model.h5 . 2>/dev/null || true
15
+
16
+ # HuggingFace Spaces runs on port 7860
17
  EXPOSE 7860
18
 
19
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]