vinay0123 commited on
Commit
8ef6a4d
·
verified ·
1 Parent(s): 6a29a8f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Copy requirement files
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 code
13
+ COPY . .
14
+
15
+ # Expose port (Spaces expects 7860 or 5000)
16
+ EXPOSE 7860
17
+
18
+ # Set environment variable for Flask
19
+ ENV FLASK_APP=app.py
20
+ ENV FLASK_RUN_PORT=7860
21
+ ENV FLASK_RUN_HOST=0.0.0.0
22
+
23
+ # Run the Flask app
24
+ CMD ["flask", "run"]