Rohit-Katkar2003 commited on
Commit
97c27e6
·
verified ·
1 Parent(s): ca40ce9

create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system deps (if needed)
6
+ RUN apt-get update && apt-get install -y git
7
+
8
+ # Install Python deps
9
+ RUN pip install torch transformers accelerate fastapi uvicorn huggingface_hub
10
+
11
+ # Copy source code
12
+ COPY . .
13
+
14
+ # Pre-download model during build (faster startup)
15
+ RUN python download_model.py
16
+
17
+ # Expose port
18
+ EXPOSE 7860
19
+
20
+ # Run API
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]