simar007 commited on
Commit
efe4a93
·
verified ·
1 Parent(s): 6096aae

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Python base image
2
+ FROM python:3.11-slim
3
+
4
+ # Set work directory
5
+ WORKDIR /app
6
+
7
+ # Copy requirements and install dependencies
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Copy all project files
12
+ COPY . .
13
+
14
+ # Expose the port Hugging Face expects
15
+ EXPOSE 7860
16
+
17
+ # Set environment variable for Flask
18
+ ENV PORT=7860
19
+ ENV FLASK_APP=app.py
20
+ ENV FLASK_ENV=production
21
+
22
+ # Command to run Flask via Gunicorn
23
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]