Atulsinghbirla commited on
Commit
1cc5cb4
·
verified ·
1 Parent(s): 346138d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile CHANGED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Copy requirements first for better caching
7
+ COPY requirements.txt .
8
+
9
+ # Install dependencies
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # Copy the rest of the app
13
+ COPY . .
14
+
15
+ # Expose the port Hugging Face expects
16
+ EXPOSE 7860
17
+
18
+ # Run the app with Gunicorn for production (binds to 0.0.0.0:7860)
19
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "0", "app:app"]