pranit144 commited on
Commit
778fbca
·
verified ·
1 Parent(s): 6509bb5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory
5
+ WORKDIR /app
6
+
7
+ # Copy application files
8
+ COPY . /app
9
+
10
+ # Ensure the uploads folder exists and is writable
11
+ RUN mkdir -p static/uploads && chmod -R 777 static/uploads
12
+
13
+ # Install dependencies
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Expose the port your app runs on
17
+ EXPOSE 7860
18
+
19
+ # Run the application with Gunicorn and increase the worker timeout to 30 seconds
20
+ CMD ["gunicorn", "-w", "4", "--timeout", "30", "-b", "0.0.0.0:7860", "app:app"]