mwauranjorogekelvin commited on
Commit
4cedae1
·
verified ·
1 Parent(s): 8e5144c

Create Dockerfile

Browse files

Add model download script

Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install dependencies first
6
+ COPY requirements.txt .
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ # Download and bake model into image at BUILD time
10
+ COPY download_model.py .
11
+ RUN python download_model.py
12
+
13
+ # Copy app last
14
+ COPY app.py .
15
+
16
+ EXPOSE 7860
17
+
18
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]