Gagan0141 commited on
Commit
a59f09c
·
verified ·
1 Parent(s): 2bab486

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lightweight Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Copy requirements first (for caching)
8
+ COPY requirements.txt requirements.txt
9
+
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copy all project files
14
+ COPY . .
15
+
16
+ # Expose port
17
+ EXPOSE 7860
18
+
19
+ # Define environment variable for Flask
20
+ ENV FLASK_APP=app.py
21
+ ENV FLASK_RUN_HOST=0.0.0.0
22
+ ENV FLASK_RUN_PORT=7860
23
+ ENV PYTHONUNBUFFERED=1
24
+
25
+ # Run the application
26
+ CMD ["flask", "run"]