pranit144 commited on
Commit
f712a50
·
verified ·
1 Parent(s): 36fdbdd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -1
Dockerfile CHANGED
@@ -10,6 +10,13 @@ COPY . /app
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
 
@@ -17,4 +24,4 @@ RUN pip install --no-cache-dir -r requirements.txt
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"]
 
10
  # Ensure the uploads folder exists and is writable
11
  RUN mkdir -p static/uploads && chmod -R 777 static/uploads
12
 
13
+ # --- NEW ADDITION ---
14
+ # Ensure the data directory exists and is writable
15
+ # This explicitly creates the /app/data directory and grants full permissions
16
+ # (read, write, execute for all users) to ensure the application can write to it.
17
+ RUN mkdir -p data && chmod -R 777 data
18
+ # --- END NEW ADDITION ---
19
+
20
  # Install dependencies
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
 
24
  EXPOSE 7860
25
 
26
  # Run the application with Gunicorn and increase the worker timeout to 30 seconds
27
+ CMD ["gunicorn", "-w", "4", "--timeout", "30", "-b", "0.0.0.0:7860", "app:app"]