COCODEDE04 commited on
Commit
929335e
·
verified ·
1 Parent(s): eb27304

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ curl ca-certificates && \
5
+ rm -rf /var/lib/apt/lists/*
6
+
7
+ WORKDIR /app
8
+
9
+ COPY requirements.txt /app/requirements.txt
10
+ RUN pip install --no-cache-dir -r /app/requirements.txt
11
+
12
+ # Copy the code and model
13
+ COPY app.py /app/app.py
14
+ COPY best_model.h5 /app/best_model.h5
15
+ COPY means_std.json /app/means_std.json
16
+
17
+ EXPOSE 7860
18
+
19
+ # Run FastAPI (this is the crucial line!)
20
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]